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
PyPlot doesn't work with the plot pane #325
Comments
@stevengj I'm trying to figure out why something like The plot does show up in the plot pane when I execute 1-element Array{PyCall.PyObject,1}:
PyObject <matplotlib.lines.Line2D object at 0x0000000024CCFBA8> which doesn't hook into the standard multimedia display system, as far as I can tell. Is that just how it is, or is there some way that we could get a simple call to |
I'm also moving this to v0.9.0 because there is a workaround for now: just call |
PyPlot functions don't return a displayable object, they work by side effects. If you want to return a displayable figure, you can do In IJulia, PyPlot pushes some hooks to display plots after a cell executes. I don't know if it is possible to do something similar with vscode? |
We just run the normal julia REPL inside VS Code and push our display backend onto the multimedia stack, that is really all we do. So unless there is some generic solution for the basic julia REPL I think we shouldn't really add anything beyond that. I think this sounds just like by design then. Thanks for clarifying! |
One alternative is to have PyPlot call |
Ah, I'll have to figure out |
The approach with gcf() displays the plot inside vscode without plot-toolbar. Therefore, important functionality is not available (zoom, save plot in different formats etc.). Note, when starting a Julia REPL in a cmd window under Windows 7, plot opens a separate window with a toolbar. With figure(..) different windows can be opened: |
If you do |
Thanks very much. Yes this works!!! |
I got the same problem and fixed it following the introductions in this issue page. Thank you very much! However, now if I want PyPlot to show the plot with a plot-toolbar, I have to add another line of code |
I think we'll add something at some point to configure the plot pane, i.e. whether it is active at all. At that point you could just disable it in the settings. |
Edit: nevermind, just had to restart the editor. |
No description provided.
The text was updated successfully, but these errors were encountered: