JuliaPy / PyPlot.jl

Plotting for Julia based on matplotlib.pyplot
https://github.com/JuliaPy/PyPlot.jl
MIT License
477 stars 88 forks source link

Cannot save figure as svg #192

Open kzapfe opened 8 years ago

kzapfe commented 8 years ago

Hello stevengj and all the gang:

This may be an issue on an update on matplotlib and not here, but I do not know for sure. I have recently created some "image" (colormaps) plots on PyPlot and saved them as svg, no problem. In the same Jupyter notebook, then, I created a more complex figure, that overlays line plots over the colormap and puts various custom labels. I can save the picture as png and eps, but not as svg. I get a very unreadable error message:

LoadError: PyError (:PyObject_Call) <class 'TypeError'>
TypeError("'H�E�I�\x07H��H[A\\A]A^A_]�H���H�\x05/��\x01H�@\x08H�E�H�\x05(��\x01H�E�1�L���\x02' object is not callable",)
  File "/usr/lib64/python3.4/site-packages/matplotlib/pyplot.py", line 688, in savefig
    res = fig.savefig(*args, **kwargs)

and continues for various lines on the same vein...

Okey, new detail: I cannot save any longer the simpler figures as svg also. I swear I did not "upgraded" anything in the middle...

stevengj commented 8 years ago

I just tried

using PyPlot
plot(rand(10))
savefig("foo.svg")

in IJulia with Julia 0.4.3 on MacOS X, using the Matplotlib from Conda, and it works fine.

kzapfe commented 8 years ago

Hi stevengj, I am pretty sure the error may be on the matplotlib side. I just ran the code at my home computer and it works there, with Julia 0.4.3 and matplotlib 1.4.3. I think at the laboratory computer there is matplotlib 1.5.0. I shall put the issue over there.

Thanks!

stevengj commented 8 years ago

@kzapfe, to be sure, the best thing to do would be to try it from Python (ideally with the same backend). If you still have the problem there, then it definitely can't be PyPlot.