using facecolor='None' for fill on Windows and Fedora

i have used this command on windows vista with no problem.

fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc=‘None’, ec=‘r’)

but when i run on fedora 8, i receive the following.

(most recent call last):
File “./program.py”, line 361, in
savefig(outfile)
File “/usr/lib/python2.5/site-packages/matplotlib/pylab.py”, line 796, in savg

   return fig.savefig(*args, **kwargs)
 File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 727, in sag
   self.canvas.print_figure(*args, **kwargs)
 File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", le

   self.draw()
 File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", lw
   self.figure.draw(renderer)
 File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 569, in drw

   for a in self.axes: a.draw(renderer)
 File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 1155, in draw
   a.draw(renderer)
 File "/usr/lib/python2.5/site-packages/matplotlib/patches.py", line 209, in dw

   else: rgbFace = colorConverter.to_rgb(self._facecolor)
 File "/usr/lib/python2.5/site-packages/matplotlib/colors.py", line 429, in tob
   raise ValueError('to_rgb: Invalid rgb arg "%s"\n%s' % (str(arg), exc))

ValueError: to_rgb: Invalid rgb arg “None”
invalid literal for float(): None

could someone tell me if i am missing something?

···


“The game of science can accurately be described as a never-ending insult to human intelligence.” - João Magueijo

Bryan Fodness wrote:

i have used this command on windows vista with no problem.

     fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')

but when i run on fedora 8, i receive the following.

[...]

     File "/usr/lib/python2.5/site-packages/matplotlib/colors.py", line 429, in tob
       raise ValueError('to_rgb: Invalid rgb arg "%s"\n%s' % (str(arg), exc))
   ValueError: to_rgb: Invalid rgb arg "None"
   invalid literal for float(): None
could someone tell me if i am missing something?

Sounds like you have an older mpl version on the Fedora machine than on the Win box.

Eric

I have updated to matplotlib 0.92.1 and numpy 1.0.4 and still receive an error.

/space/work/Bryan$ ./Check_0.1.py
Traceback (most recent call last):
File “./Check_0.1.py”, line 344, in
savefig(outfile)

File “/usr/lib/python2.5/site-packages/matplotlib/pylab.py”, line 796, in savefig
return fig.savefig(*args, **kwargs)
File “/usr/lib/python2.5/site-packages/matplotlib/figure.py”, line 727, in savefig

self.canvas.print_figure(*args, **kwargs)

File “/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py”, line 456, in print_figure
self.draw()
File “/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py”, line 392, in draw

self.figure.draw(renderer)

File “/usr/lib/python2.5/site-packages/matplotlib/figure.py”, line 569, in draw
for a in self.axes: a.draw(renderer)
File “/usr/lib/python2.5/site-packages/matplotlib/axes.py”, line 1155, in draw

a.draw(renderer)

File “/usr/lib/python2.5/site-packages/matplotlib/patches.py”, line 209, in draw
else: rgbFace = colorConverter.to_rgb(self._facecolor)
File “/usr/lib/python2.5/site-packages/matplotlib/colors.py”, line 429, in to_rgb

raise ValueError('to_rgb: Invalid rgb arg "%s"\n%s' % (str(arg), exc))

ValueError: to_rgb: Invalid rgb arg “None”
invalid literal for float(): None

Does anyone have an idea? It works in Windows.

···

On Fri, May 9, 2008 at 5:18 PM, Eric Firing <efiring@…202…> wrote:

Bryan Fodness wrote:

i have used this command on windows vista with no problem.

fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')

but when i run on fedora 8, i receive the following.

[…]

File “/usr/lib/python2.5/site-packages/matplotlib/colors.py”, line 429, in tob
raise ValueError(‘to_rgb: Invalid rgb arg “%s”\n%s’ % (str(arg), exc))

ValueError: to_rgb: Invalid rgb arg “None”
invalid literal for float(): None
could someone tell me if i am missing something?

Sounds like you have an older mpl version on the Fedora machine than on the Win box.

Eric


“The game of science can accurately be described as a never-ending insult to human intelligence.” - João Magueijo

Bryan,

It appears that you are not using the mpl version you think you are. When I look at colors.py for 0.92.1, it doesn't match your error message.

What do you get when you do, from a python prompt:

import matplotlib
print matplotlib.__version__

You might try using "locate pylab.py" to find out where the various versions are.

Eric

Bryan Fodness wrote:

···

I have updated to matplotlib 0.92.1 and numpy 1.0.4 and still receive an error.
/space/work/Bryan$ ./Check_0.1.py <http://Check_0.1.py>
Traceback (most recent call last):
  File "./Check_0.1.py <http://Check_0.1.py>", line 344, in <module>
    savefig(outfile)
  File "/usr/lib/python2.5/site-packages/matplotlib/pylab.py", line 796, in savefig
    return fig.savefig(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 727, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", line 456, in print_figure
    self.draw()
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", line 392, in draw
    self.figure.draw(renderer)
  File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 569, in draw
    for a in self.axes: a.draw(renderer)
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 1155, in draw
    a.draw(renderer)
  File "/usr/lib/python2.5/site-packages/matplotlib/patches.py", line 209, in draw
    else: rgbFace = colorConverter.to_rgb(self._facecolor)
  File "/usr/lib/python2.5/site-packages/matplotlib/colors.py", line 429, in to_rgb
    raise ValueError('to_rgb: Invalid rgb arg "%s"\n%s' % (str(arg), exc))
ValueError: to_rgb: Invalid rgb arg "None"
invalid literal for float(): None
Does anyone have an idea? It works in Windows.
On Fri, May 9, 2008 at 5:18 PM, Eric Firing <efiring@...202... > <mailto:efiring@…202…>> wrote:

    Bryan Fodness wrote:

        i have used this command on windows vista with no problem.

            fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')

        but when i run on fedora 8, i receive the following.

    [...]

            File
        "/usr/lib/python2.5/site-packages/matplotlib/colors.py", line
        429, in tob
              raise ValueError('to_rgb: Invalid rgb arg "%s"\n%s' %
        (str(arg), exc))
          ValueError: to_rgb: Invalid rgb arg "None"
          invalid literal for float(): None
        could someone tell me if i am missing something?
         
    Sounds like you have an older mpl version on the Fedora machine than
    on the Win box.

    Eric

--
"The game of science can accurately be described as a never-ending insult to human intelligence." - Jo�o Magueijo

i didn’t have 0.92.1, i have 0.91.2

[bryan@ ~]$ python
Python 2.5.2 (r252:60911, May 13 2008, 22:14:05)
[GCC 4.1.2 20070502 (Red Hat 4.1.2-12)] on linux2

Type “help”, “copyright”, “credits” or “license” for more information.

import matplotlib
matplotlib.version

‘0.91.2’

import numpy
numpy.version

‘1.0.4’

[bryan@ ~]$ locate pylab.py
/usr/lib/python2.5/site-packages/pylab.py
/usr/lib/python2.5/site-packages/pylab.pyc
/usr/lib/python2.5/site-packages/pylab.pyo

/usr/lib/python2.5/site-packages/matplotlib/pylab.py
/usr/lib/python2.5/site-packages/matplotlib/pylab.pyc
/usr/lib/python2.5/site-packages/matplotlib/pylab.pyo
/usr/local/lib/python2.5/site-packages/pylab.py

/usr/local/lib/python2.5/site-packages/pylab.pyc
/usr/local/lib/python2.5/site-packages/matplotlib/pylab.py
/usr/local/lib/python2.5/site-packages/matplotlib/pylab.pyc
[bryan@~]$

···

On Fri, May 16, 2008 at 1:35 PM, Eric Firing <efiring@…202…> wrote:

Bryan,

It appears that you are not using the mpl version you think you are. When I look at colors.py for 0.92.1, it doesn’t match your error message.

What do you get when you do, from a python prompt:

import matplotlib
print matplotlib.version

You might try using “locate pylab.py” to find out where the various versions are.

Eric

Bryan Fodness wrote:

I have updated to matplotlib 0.92.1 and numpy 1.0.4 and still receive an error.

/space/work/Bryan$ ./Check_0.1.py <http://Check_0.1.py>

Traceback (most recent call last):

File “./Check_0.1.py <http://Check_0.1.py>”, line 344, in

savefig(outfile)
File “/usr/lib/python2.5/site-packages/matplotlib/pylab.py”, line 796, in savefig
return fig.savefig(*args, **kwargs)
File “/usr/lib/python2.5/site-packages/matplotlib/figure.py”, line 727, in savefig

self.canvas.print_figure(*args, **kwargs)
File “/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py”, line 456, in print_figure
self.draw()
File “/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py”, line 392, in draw

self.figure.draw(renderer)
File “/usr/lib/python2.5/site-packages/matplotlib/figure.py”, line 569, in draw
for a in self.axes: a.draw(renderer)
File “/usr/lib/python2.5/site-packages/matplotlib/axes.py”, line 1155, in draw

a.draw(renderer)
File “/usr/lib/python2.5/site-packages/matplotlib/patches.py”, line 209, in draw
else: rgbFace = colorConverter.to_rgb(self._facecolor)
File “/usr/lib/python2.5/site-packages/matplotlib/colors.py”, line 429, in to_rgb

raise ValueError(‘to_rgb: Invalid rgb arg “%s”\n%s’ % (str(arg), exc))
ValueError: to_rgb: Invalid rgb arg “None”
invalid literal for float(): None
Does anyone have an idea? It works in Windows.

On Fri, May 9, 2008 at 5:18 PM, Eric Firing <efiring@…202… mailto:efiring@...202...> wrote:

Bryan Fodness wrote:

   i have used this command on windows vista with no problem.

       fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')

   but when i run on fedora 8, i receive the following.

[…]

       File
   "/usr/lib/python2.5/site-packages/matplotlib/colors.py", line
   429, in tob
         raise ValueError('to_rgb: Invalid rgb arg "%s"\n%s' %

   (str(arg), exc))
     ValueError: to_rgb: Invalid rgb arg "None"
     invalid literal for float(): None
   could someone tell me if i am missing something?

Sounds like you have an older mpl version on the Fedora machine than

on the Win box.

Eric


“The game of science can accurately be described as a never-ending insult to human intelligence.” - João Magueijo


“The game of science can accurately be described as a never-ending insult to human intelligence.” - João Magueijo

Thanks for your help!

I was forcing it to look in an old location with,

#!/usr/bin/python

as my first line.

···

On Fri, May 16, 2008 at 1:44 PM, Bryan Fodness <bryan.fodness@…287…> wrote:

i didn’t have 0.92.1, i have 0.91.2

[bryan@ ~]$ python
Python 2.5.2 (r252:60911, May 13 2008, 22:14:05)
[GCC 4.1.2 20070502 (Red Hat 4.1.2-12)] on linux2

Type “help”, “copyright”, “credits” or “license” for more information.

import matplotlib
matplotlib.version

‘0.91.2’

import numpy
numpy.version

‘1.0.4’

[bryan@ ~]$ locate pylab.py
/usr/lib/python2.5/site-packages/pylab.py
/usr/lib/python2.5/site-packages/pylab.pyc
/usr/lib/python2.5/site-packages/pylab.pyo
/usr/lib/python2.5/site-packages/matplotlib/pylab.py

/usr/lib/python2.5/site-packages/matplotlib/pylab.pyc
/usr/lib/python2.5/site-packages/matplotlib/pylab.pyo
/usr/local/lib/python2.5/site-packages/pylab.py

/usr/local/lib/python2.5/site-packages/pylab.pyc
/usr/local/lib/python2.5/site-packages/matplotlib/pylab.py
/usr/local/lib/python2.5/site-packages/matplotlib/pylab.pyc
[bryan@~]$

On Fri, May 16, 2008 at 1:35 PM, Eric Firing <efiring@…202…> wrote:

Bryan,

It appears that you are not using the mpl version you think you are. When I look at colors.py for 0.92.1, it doesn’t match your error message.

What do you get when you do, from a python prompt:

import matplotlib
print matplotlib.version

You might try using “locate pylab.py” to find out where the various versions are.

Eric

Bryan Fodness wrote:

I have updated to matplotlib 0.92.1 and numpy 1.0.4 and still receive an error.

/space/work/Bryan$ ./Check_0.1.py <http://Check_0.1.py>

Traceback (most recent call last):

File “./Check_0.1.py <http://Check_0.1.py>”, line 344, in

savefig(outfile)
File “/usr/lib/python2.5/site-packages/matplotlib/pylab.py”, line 796, in savefig
return fig.savefig(*args, **kwargs)
File “/usr/lib/python2.5/site-packages/matplotlib/figure.py”, line 727, in savefig

self.canvas.print_figure(*args, **kwargs)
File “/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py”, line 456, in print_figure
self.draw()
File “/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py”, line 392, in draw

self.figure.draw(renderer)
File “/usr/lib/python2.5/site-packages/matplotlib/figure.py”, line 569, in draw
for a in self.axes: a.draw(renderer)
File “/usr/lib/python2.5/site-packages/matplotlib/axes.py”, line 1155, in draw

a.draw(renderer)
File “/usr/lib/python2.5/site-packages/matplotlib/patches.py”, line 209, in draw
else: rgbFace = colorConverter.to_rgb(self._facecolor)
File “/usr/lib/python2.5/site-packages/matplotlib/colors.py”, line 429, in to_rgb

raise ValueError(‘to_rgb: Invalid rgb arg “%s”\n%s’ % (str(arg), exc))
ValueError: to_rgb: Invalid rgb arg “None”
invalid literal for float(): None
Does anyone have an idea? It works in Windows.

On Fri, May 9, 2008 at 5:18 PM, Eric Firing <efiring@…202… mailto:efiring@...202...> wrote:

Bryan Fodness wrote:

   i have used this command on windows vista with no problem.

       fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')

   but when i run on fedora 8, i receive the following.

[…]

       File
   "/usr/lib/python2.5/site-packages/matplotlib/colors.py", line
   429, in tob
         raise ValueError('to_rgb: Invalid rgb arg "%s"\n%s' %

   (str(arg), exc))
     ValueError: to_rgb: Invalid rgb arg "None"
     invalid literal for float(): None
   could someone tell me if i am missing something?

Sounds like you have an older mpl version on the Fedora machine than

on the Win box.

Eric


“The game of science can accurately be described as a never-ending insult to human intelligence.” - João Magueijo


“The game of science can accurately be described as a never-ending insult to human intelligence.” - João Magueijo

“The game of science can accurately be described as a never-ending insult to human intelligence.” - João Magueijo

Bryan Fodness wrote:

i didn't have 0.92.1, i have 0.91.2

Right, we were both transposing digits.

[bryan@ ~]$ python Python 2.5.2 (r252:60911, May 13 2008, 22:14:05) [GCC 4.1.2 20070502 (Red Hat 4.1.2-12)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib >>> matplotlib.__version__ '0.91.2' >>> import numpy >>> numpy.__version__ '1.0.4' >>>

[bryan@ ~] locate pylab\.py /usr/lib/python2\.5/site\-packages/pylab\.py /usr/lib/python2\.5/site\-packages/pylab\.pyc /usr/lib/python2\.5/site\-packages/pylab\.pyo /usr/lib/python2\.5/site\-packages/matplotlib/pylab\.py /usr/lib/python2\.5/site\-packages/matplotlib/pylab\.pyc /usr/lib/python2\.5/site\-packages/matplotlib/pylab\.pyo /usr/local/lib/python2\.5/site\-packages/pylab\.py /usr/local/lib/python2\.5/site\-packages/pylab\.pyc /usr/local/lib/python2\.5/site\-packages/matplotlib/pylab\.py /usr/local/lib/python2\.5/site\-packages/matplotlib/pylab\.pyc \[bryan@\~\]

OK, so you do have two versions installed, and I would still bet that modules from the older version are getting found when you run your script, if not when you do the test above.

You installed 0.91.2 from source in /usr/local/lib/*, correct? Then use your package manager to delete the older version (in /usr/lib/*), and try again.

Eric

···

On Fri, May 16, 2008 at 1:35 PM, Eric Firing <efiring@...202... > <mailto:efiring@…202…>> wrote:

    Bryan,

    It appears that you are not using the mpl version you think you are.
    When I look at colors.py for 0.92.1, it doesn't match your error
    message.

    What do you get when you do, from a python prompt:

    import matplotlib
    print matplotlib.__version__

    You might try using "locate pylab.py" to find out where the various
    versions are.

    Eric

    Bryan Fodness wrote:

        I have updated to matplotlib 0.92.1 and numpy 1.0.4 and still
        receive an error.
        /space/work/Bryan$ ./Check_0.1.py <http://check_0.1.py/>
        <http://Check_0.1.py <http://check_0.1.py/>>

        Traceback (most recent call last):
         File "./Check_0.1.py <http://check_0.1.py/>
        <http://Check_0.1.py <http://check_0.1.py/>>", line 344, in
        <module>

           savefig(outfile)
         File "/usr/lib/python2.5/site-packages/matplotlib/pylab.py",
        line 796, in savefig
           return fig.savefig(*args, **kwargs)
         File "/usr/lib/python2.5/site-packages/matplotlib/figure.py",
        line 727, in savefig
           self.canvas.print_figure(*args, **kwargs)
         File
        "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py",
        line 456, in print_figure
           self.draw()
         File
        "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py",
        line 392, in draw
           self.figure.draw(renderer)
         File "/usr/lib/python2.5/site-packages/matplotlib/figure.py",
        line 569, in draw
           for a in self.axes: a.draw(renderer)
         File "/usr/lib/python2.5/site-packages/matplotlib/axes.py",
        line 1155, in draw
           a.draw(renderer)
         File "/usr/lib/python2.5/site-packages/matplotlib/patches.py",
        line 209, in draw
           else: rgbFace = colorConverter.to_rgb(self._facecolor)
         File "/usr/lib/python2.5/site-packages/matplotlib/colors.py",
        line 429, in to_rgb
           raise ValueError('to_rgb: Invalid rgb arg "%s"\n%s' %
        (str(arg), exc))
        ValueError: to_rgb: Invalid rgb arg "None"
        invalid literal for float(): None
        Does anyone have an idea? It works in Windows.
         On Fri, May 9, 2008 at 5:18 PM, Eric Firing <efiring@...202... > <mailto:efiring@…202…> <mailto:efiring@…202… > <mailto:efiring@…202…>>> wrote:

           Bryan Fodness wrote:

               i have used this command on windows vista with no problem.

                   fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')

               but when i run on fedora 8, i receive the following.

           [...]

                   File
               "/usr/lib/python2.5/site-packages/matplotlib/colors.py", line
               429, in tob
                     raise ValueError('to_rgb: Invalid rgb arg "%s"\n%s' %
               (str(arg), exc))
                 ValueError: to_rgb: Invalid rgb arg "None"
                 invalid literal for float(): None
               could someone tell me if i am missing something?
               
           Sounds like you have an older mpl version on the Fedora
        machine than
           on the Win box.

           Eric

        -- "The game of science can accurately be described as a
        never-ending insult to human intelligence." - Jo�o Magueijo

--
"The game of science can accurately be described as a never-ending insult to human intelligence." - Jo�o Magueijo

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options