[Nix-dev] Is anyone using Julia with PyPlot?
Andreas Herrmann
andreash87 at gmx.ch
Tue Dec 2 12:07:32 CET 2014
On Monday 01 December 2014 18:19:38 Bjørn Forsman wrote:
> Might be that matplotlib runs with wrong (non-gui) default backend...? At
> least I had some issues with that when packaging gnuradio.
It does indeed `plt.get_backend()` returns "agg".
Thanks for that hint. I just noticed, that I misread the README of PyPlot. If I do the following it works properly:
julia> using PyCall # PyCall, not PyPlot
julia> pygui(:qt) # :wx works too
julia> using PyPlot
julia> plot([1,2,3],[1,2,4]) # Displays plot window
On Tuesday 02 December 2014 09:53:38 Michael Raskin wrote:
> Haven't yet launched X since your last email, but have you tried
> pygui(:wx)?
With the above it's working fine in the cli. The only remaining issue is with the IJulia notebooks. Plots are only shown inline if I explicitly display the figure object. I would expect this to happen the same way as in IPython just after a call to plot, as advertized in [1].
On Monday 01 December 2014 21:50:07 Domen Kožar wrote:
> Most probably related to https://github.com/NixOS/nixpkgs/issues/4500
I haven't tried GTK3, yet. But, for me plotting works fine in Python with qt4, and wx:
>>> import matplotlib
>>> matplotlib.use("Qt4Agg") # Or "WXAgg"
>>> import matplotlib.pylab as plt
>>> plt.plot([1,2,3],[1,2,4])
>>> plt.show() # Shows the plot window
I'll take a closer look at it later.
[1]: http://nbviewer.ipython.org/url/jdj.mit.edu/~stevenj/IJulia%20Preview.ipynb
More information about the nix-dev
mailing list