plotting problems in qt4agg backend on Mac OS X

Jan Strube <curiousjan@...287...> writes:

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)

How about axhline?

The eps doesn't get filled with the correct colors, and the pdf and
the svg don't work at all.

But there is a pdf file at

https://jstrube.web.cern.ch/jstrube/matplotlib_testcase/lambdaPbarGamma_all.pdf

When you say that pdf doesn't "work at all", do you mean that the hatch
patterns are missing?

I just tried examples/pylab_examples/hatch_demo.py, and both the pdf and
svg backends produced correct-looking output. Does hatch_demo.py work
correctly in your environment?

···

--
Jouni K. Sepp�nen
http://www.iki.fi/jks

Hi Jouni,

Jouni K. Seppänen wrote:

How about axhline?

Yes! That's what I wanted. Thanks.

The eps doesn't get filled with the correct colors, and the pdf and
the svg don't work at all.

But there is a pdf file at

https://jstrube.web.cern.ch/jstrube/matplotlib_testcase/lambdaPbarGamma_all.pdf

When you say that pdf doesn't "work at all", do you mean that the hatch
patterns are missing?

It's a hack to get it working at all. I tried to fix the error message
below, but as a result there are no hatch patterns...
The error message is
  File "matplotlib_bug.py", line 75, in <module>
    pl.savefig('lambdaPbarGamma_all.pdf')
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/pyplot.py",
line 354, in savefig
    return fig.savefig(*args, **kwargs)
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/figure.py",
line 1002, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/backend_bases.py",
line 1476, in print_figure
    **kwargs)
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/backends/backend_pdf.py",
line 2000, in print_pdf
    self.figure.draw(renderer)
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/artist.py",
line 46, in draw_wrapper
    draw(artist, renderer, *kl)
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/figure.py",
line 774, in draw
    for a in self.axes: a.draw(renderer)
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/artist.py",
line 46, in draw_wrapper
    draw(artist, renderer, *kl)
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/axes.py",
line 1826, in draw
    a.draw(renderer)
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/artist.py",
line 46, in draw_wrapper
    draw(artist, renderer, *kl)
  File
"/home/jstrube/local/lib64/python2.6/site-packages/matplotlib/patches.py",
line 326, in draw
    renderer.draw_path(gc, tpath, affine, rgbFace)
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/backends/backend_pdf.py",
line 1307, in draw_path
    self.file.output(self.gc.paint())
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/backends/backend_pdf.py",
line 1739, in paint
    if self._fillp():
  File
"/home/jstrube/local//lib64/python2.6/site-packages/matplotlib/backends/backend_pdf.py",
line 1723, in _fillp
    (len(self._fillcolor) <= 3 or self._fillcolor[3] != 0.0))
TypeError: object of type 'NoneType' has no len()

This is the case not only for the pdf backend, but for the qt4agg backend as
well.
This is also reproducible under linux.

I just tried examples/pylab_examples/hatch_demo.py, and both the pdf and
svg backends produced correct-looking output. Does hatch_demo.py work
correctly in your environment?

Yes, the example works just fine. I am attaching a self-contained example to
reproduce the problem.

Thanks for your help.
Cheers,
    Jan
http://www.nabble.com/file/p24542241/matplotlib_bug.py matplotlib_bug.py

···

--
Jouni K. Seppänen
http://www.iki.fi/jks

------------------------------------------------------------------------------
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

--
View this message in context: http://www.nabble.com/plotting-problems-in-qt4agg-backend-on-Mac-OS-X-tp24499919p24542241.html
Sent from the matplotlib - users mailing list archive at Nabble.com.