Open quinnj opened 10 years ago
Does this have to do with opening PyPlot plots?
For me it works out to do PyPlot.pygui(true)
before plotting, then everything works like a charm.
But that probably opens up the plot in a separate window, right? With the newest release of sublime, you can actually open images in a new view in sublime, so it's a little more "inline" (and hopefully it'll be true inline soon). This would involve correctly handling the "display_data" tag returned by the IJulia kernel when a request ot plot was made.
yes, that opens it in a new window. I didn't know that the inline capability would be possible, sounds very good indeed.
Updated the issue to be more clear. Yeah, I knew it was possible to open up new windows with plots if the plotting package supports that, but the next step is doing it all within sublime.
At least Winston is capable of producing png-figures straight away so this should be doable. So in order for this to work one should modify the handling of display_data tag and open a new tab if png is found?
Yep. I'm not quite sure how the .png is "returned", if it's written to disk first and the file name is returned, or if some kind of binary data is returned. That's to be figured out! I actually have skeleton methods in there already, but they just no-op for the moment.
https://github.com/karbarcca/Sublime-IJulia/blob/master/Kernel.py#L344 https://github.com/karbarcca/Sublime-IJulia/blob/master/Kernel.py#L398
The links above go to the skeleton methods that are in the code right now. We may or may not want a method in the IJulia.py
IJuliaView
class as well that opens up the new view.
If I do:
using PyPlot; PyPlot.pygui(true)
I get:
ERROR: No working GUI backend found for matplotlib.
I am on OSX 10.9.3.
Plotting in an external windows would be OK in the interim. the reason why pygui(true)
returns the error is because Julia cannot find the path the python matplot library. I think the problems relies on the fact that julia is launched in the .app container and the environment (containing the path to python, etc.) is not loaded.
Also once julia is run inside Sublime it would be nice if the default folder is the user home. instead it is the .app container of Sublime text. In Sublime-IJulia try:
In [2]: pwd()
Out [2]: "/Applications/Sublime Text.app/Contents/MacOS"
I'm running OSX 10.9.5, Sublime Text Build 3065, Julia 0.3.1 (as .app package, not compiled from source).
Any progress on this? Being able to plot either in a pane in Sublime or a popup window would be huge.
I am using sublime text 2 and cant get it to display plots, has this been solved and I am just not finding the answer? The PyPlot.pygui(true)
does not work for me.
This is up for grabs if anyone feels willing to take it on. I just don't have the time right now. See this thread for more discussion.
https://groups.google.com/forum/m/#!searchin/julia-users/sublime/julia-users/-W4LiTtVeAE