In the example of density plot, I tried to use "surface plot" instead of "density plot",
g = graph.graphxy(height=8, width=8,
x=graph.axis.linear(min=re_min, max=re_max, title=r"$\Re(c)$"),
y=graph.axis.linear(min=im_min, max=im_max, title=r'$\Im(c)$'))
g.plot(graph.data.points(d, x=1, y=2, color=3, title="iterations"),
[graph.style.surface()]) # <<-- I changed this line
g.writeEPSfile()
g.writePDFfile()
Interestingly, I cannot open any of the files (EPS or PDF) using Mac OS 10.6: it crashes either the Finder or the Preview.
I have no clue why this is happening. Can anyone reproduce this behavior on a Linux/Windows machine to confirm it is a problem of the OS?
This is a known problem of buggy implementations of PS/PDF shadings. But if you have the Python Imaging Library PIL installed, you can readily produce an output file with a
rendered version of the shading, e.g., by using
g.writeEPSfile(write_mesh_as_bitmap=True)
Doesn't look like a PyX bug to me either. The Finder and Preview do not crash for me. I'm on OS 10.7. Still, there are some artifacts, though. In contrast Acrobat Pro X does display the file properly (again, on OS 10.7). As Jörg already mentioned, shadings are a common source of trouble (and PyX provides a shading replacement feature, which does however require ghostscript and PIL).
I'm closing the request.