Hi matplotters,

I am trying to create an image and save it to pdf.
Unfortunately, the result is much different if I save it to pdf, eps or png. I am on Mac OS X 10.4, using qt4 4.5.0 and the qt4agg backend (but the problems also occur with -dmacosx).

The plot I am trying to make is an overlay of hists + datapoints with errorbars. The png roughly looks like I would expect (although I can't figure out how to plot a straight black horizontal line at y=0. pylab.plot doesn't seem to do what I want) The eps doesn't get filled with the correct colors, and the pdf and the svg don't work at all.

The error message for saving as svg is inlined below the message.
The rest of the files should be accessible at https:// jstrube.web.cern.ch/jstrube/matplotlib_testcase/ You need the python bindings to CERN's ROOT libraries if you want to reproduce the plot.

Any help is greatly appreciated.
Cheers,
    Jan

  File "analyzeLambdaPbarGammaShape.py", line 128, in <module>
    pl.savefig('lambdaPbarGamma_all.svg')
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/pyplot.py", line 354, in savefig
    return fig.savefig(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/figure.py", line 1002, in savefig
    self.canvas.print_figure(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backends/backend_qt4agg.py", line 144, in print_figure
    FigureCanvasAgg.print_figure(self, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backend_bases.py", line 1476, in print_figure
    **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backend_bases.py", line 1355, in print_svg
    return svg.print_svg(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backends/backend_svg.py", line 615, in print_svg
    return self._print_svg(filename, svgwriter, fh_to_close, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backends/backend_svg.py", line 650, in _print_svg
    self.figure.draw(renderer)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/artist.py", line 46, in draw_wrapper
    draw(artist, renderer, *kl)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/figure.py", line 774, in draw
    for a in self.axes: a.draw(renderer)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/artist.py", line 46, in draw_wrapper
    draw(artist, renderer, *kl)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/axes.py", line 1826, in draw
    a.draw(renderer)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/artist.py", line 46, in draw_wrapper
    draw(artist, renderer, *kl)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/patches.py", line 326, in draw
    renderer.draw_path(gc, tpath, affine, rgbFace)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backends/backend_svg.py", line 233, in draw_path
    self._draw_svg_element('path', 'd="%s"' % path_data, gc, rgbFace)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backends/backend_svg.py", line 69, in _draw_svg_element
    style = self._get_style(gc, rgbFace)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backends/backend_svg.py", line 121, in _get_style
    fill = "url(#%s)" % self._get_hatch(gc, rgbFace)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backends/backend_svg.py", line 107, in _get_hatch
    (HATCH_SIZE+1, HATCH_SIZE+1, rgb2hex(rgbFace)))
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/colors.py", line 221, in rgb2hex
    return '#%02x%02x%02x' % tuple([round(val*255) for val in rgb])
TypeError: 'NoneType' object is not iterable


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to