New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not compatible with latest matplotlib version #79
Comments
This almost looks like using PyPlot
PyPlot.pltm[:isinteractive]() returns a boolean. A workaround would be to change line 168 of PyPlot.jl, in the definition of |
Yes, it is indeed returning 0 (mpl 1.4) and true (mpl 1.3). With your proposed workaround the exception is no longer thrown. However, no graph gets drawn in the notebook. Here is my patch: --- a/src/PyPlot.jl
+++ b/src/PyPlot.jl
@@ -162,13 +162,14 @@ svg(b::Bool) = (SVG[1] = b)
Base.isempty(f::Figure) = isempty(pycall(f["get_axes"], PyVector))
function draw_if_interactive()
if isjulia_display[1]
- if pltm[:isinteractive]()
+ if pycall(pltm["isinteractive"], Bool)
manager = Gcf[:get_active]()
if manager != nothing
fig = Figure(manager["canvas"]["figure"]) |
If it is returning 0 then there are two problems. First, it is returning an integer for some reason, although my suggestion above works around this. Second, the integer 0 corresponds to |
What operating system are you using? If you are on Linux, can you try |
I was just about to report the same error... On MacOS. The above command you asked for returns 0.
|
I'm using Linux. No window pops up if i set the backend to 'gtk' and call |
Are you running in IJulia or the REPL? |
IJulia - I started IJulia from the REPL. ( |
No window should pop up in IJulia unless you do |
pygui(true) has no effect.
same with gtk backend (after a restart of julia):
I also tried this
|
I face the same problem, can please submit a fix soon? |
I applied it to the code in .julia/PyPlot/... However, it still does not work On Thu, Aug 28, 2014 at 7:35 PM, Freddy Chua notifications@github.com
|
help... i updated matplotlib to 1.4 through homebrew on osx, now i cannot revert back to the old 1.3 and pyplot does not work as a result.. |
Maybe try uninstalling the brew one and then install 1.3 with pip: pip install matplotlib==1.3.1 I had success with Python 2.7.8 and the corresponding pip installed from homebrew, and then the above pip command for matplotlib. |
(after messing around with a lot of other combinations, none of which worked...) |
well, I removed the homebrew matplotlib 1.4, I am not able to get back the 1.3 version on homebrew, so i eventually install matplotlib using 1.3 I still hope stevengj quickly update PyPlot so that we can use it with matplotlib 1.4 |
Same here, when using plot, a julia exec instance appears on OS X dock. But no GUI (forget the first error line in the capture above, I am not really awake this morning) |
I'm having the same issue. If it is of any help (I believe in going back to basics to diagnose stuff), the simple matplotlib tutorial at http://nbviewer.ipython.org/github/jrjohansson/scientific-python-lectures/blob/master/Lecture-4-Matplotlib.ipynb works with IPython (using the 'python' profile of course) and this new matplotlib version. Using Arch Linux x86_64, python 3.4.1-1, python-matplotlib 1.4.0-1, i see: In [1]: %matplotlib inline
In [2]: from pylab import *
In [3]: x = linspace(0, 5, 10)
y = x ** 2
figure()
plot(x, y, 'r')
xlabel('x')
ylabel('y')
title('title')
show() (plot is shown inline) In [6]: mpl.is_interactive()
Out[6]: True |
This seems to have gotten broken by matplotlib/matplotlib#2286 (subsequently further modified by matplotlib/matplotlib#2503). Basically, Matplotlib refuses to enable interactive mode because it thinks that Python is non-interactive. @mdboom, the difficulty with these patches is that they assume that Matplotlib can only be used interactively via the A workaround would be for PyPlot to set |
Looks like a workaround is for me to manually set |
Thanks, works like a charm now.. |
Thanks. |
I get the following exception when i try to execute (matplotlib version: 1.4/1.5.dev)
The text was updated successfully, but these errors were encountered: