edgecolor with usetex=True, usedistiller='pdf'

The above exchange was off-list, we're back on now. I think that would be what
Tom is looking for, but it doesnt work:

In [1]: plot([1,2])
Out[1]: [<matplotlib.lines.Line2D instance at 0x710cb0>]

In [2]: savefig('dsd.png', facecolor='None', edgecolor='None')

路路路

On Friday 28 September 2007 07:36:23 am John Hunter wrote:

On 9/27/07, Darren Dale <dd55@...163...> wrote:
> Hi Eric, John,
>
> Have either of you been following this thread?

I am now :slight_smile:

As Eric suggests, None is overloaded vis-a-vis color handling, because
for mpl properties it generally means do the default as defined by rc.
For colors people often want to use None for "no color" which is why
we added support for the string "None". Does this work in your use
case Tom?

---------------------------------------------------------------------------
ValueError Traceback (most recent call last)

/home/darren/<ipython console> in <module>()

/usr/lib64/python2.5/site-packages/matplotlib/pyplot.py in savefig(*args,
**kwargs)
聽聽聽聽272 def savefig(*args, **kwargs):
聽聽聽聽273 fig = gcf()
--> 274 return fig.savefig(*args, **kwargs)
聽聽聽聽275 if Figure.savefig.__doc__ is not None:
聽聽聽聽276 savefig.__doc__ = dedent(Figure.savefig.__doc__)

/usr/lib64/python2.5/site-packages/matplotlib/figure.py in savefig(self,
*args, **kwargs)
聽聽聽聽768 kwargs[key] = rcParams['savefig.%s'%key]
聽聽聽聽769
--> 770 self.canvas.print_figure(*args, **kwargs)
聽聽聽聽771
聽聽聽聽772 def colorbar(self, mappable, cax=None, **kw):

/usr/lib64/python2.5/site-packages/matplotlib/backends/backend_qt4agg.py in
print_figure(self, *args, **kwargs)
聽聽聽聽153 self.update(l, self.renderer.height-t, w, h)
聽聽聽聽154
聽聽聽聽155 def print_figure(self, *args, **kwargs):
--> 156 FigureCanvasAgg.print_figure(self, *args, **kwargs)
聽聽聽聽157 self.draw()

/usr/lib64/python2.5/site-packages/matplotlib/backend_bases.py in
print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format,
**kwargs)
聽聽聽1194 edgecolor=edgecolor,
聽聽聽1195 orientation=orientation,
-> 1196 **kwargs)
聽聽聽1197 finally:
聽聽聽1198 self.figure.dpi.set(origDPI)

/usr/lib64/python2.5/site-packages/matplotlib/backends/backend_agg.py in
print_png(self, filename, *args, **kwargs)
聽聽聽聽415
聽聽聽聽416 def print_png(self, filename, *args, **kwargs):
--> 417 self.draw()
聽聽聽聽418 self.get_renderer()._renderer.write_png(str(filename))
聽聽聽聽419

/usr/lib64/python2.5/site-packages/matplotlib/backends/backend_qt4agg.py in
draw(self)
聽聽聽聽140 if DEBUG: print "FigureCanvasQtAgg.draw", self
聽聽聽聽141 self.replot = True
--> 142 FigureCanvasAgg.draw(self)
聽聽聽聽143 self.update()
聽聽聽聽144

/usr/lib64/python2.5/site-packages/matplotlib/backends/backend_agg.py in
draw(self)
聽聽聽聽377
聽聽聽聽378 self.renderer = self.get_renderer()
--> 379 self.figure.draw(self.renderer)
聽聽聽聽380
聽聽聽聽381 def get_renderer(self):

/usr/lib64/python2.5/site-packages/matplotlib/figure.py in draw(self,
renderer)
聽聽聽聽586 self.transFigure.freeze() # eval the lazy objects
聽聽聽聽587
--> 588 if self.frameon: self.figurePatch.draw(renderer)
聽聽聽聽589
聽聽聽聽590 for p in self.patches: p.draw(renderer)

/usr/lib64/python2.5/site-packages/matplotlib/patches.py in draw(self,
renderer)
聽聽聽聽198 #renderer.open_group('patch')
聽聽聽聽199 gc = renderer.new_gc()
--> 200 gc.set_foreground(self._edgecolor)
聽聽聽聽201 gc.set_linewidth(self._linewidth)
聽聽聽聽202 gc.set_alpha(self._alpha)

/usr/lib64/python2.5/site-packages/matplotlib/backend_bases.py in
set_foreground(self, fg, isRGB)
聽聽聽聽617 self._rgb = fg
聽聽聽聽618 else:
--> 619 self._rgb = colors.colorConverter.to_rgb(fg)
聽聽聽聽620
聽聽聽聽621 def set_graylevel(self, frac):

/usr/lib64/python2.5/site-packages/matplotlib/colors.py in to_rgb(self, arg)
聽聽聽聽277
聽聽聽聽278 except (KeyError, ValueError, TypeError), exc:
--> 279 raise ValueError('to_rgb: Invalid rgb arg "%s"\n%s' %
(str(arg), exc))
聽聽聽聽280 # Error messages could be improved by handling TypeError
聽聽聽聽281 # separately; but this should be rare and not too hard

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