Best plot package?

Hello!

I’m using the Juno IDE and want to have bar graphs pop up on a separate window like a GUI so you can watch it update when its values change. I know Juno has a plotting window but I want it to pop up on its own plotting window outside of the IDE. Does anyone know a good package I can use to do this? Any help would be appreciated! Thanks!

If you use Plots.jl, just call gui() to open up a plotting window with PyPlot or GR. Or use the Plotly backend to open it in a browser.

3 Likes

If you use atom, the Hydrogen package can run Julia code inline. It has “watched expressions” which sound exactly like what you want. It makes a window on the side of the editor and every time you evaluate a bit of code in the main window it re-evaluates the code you put in your watched expression, in this case a plot. Here’s an example which is mostly python code but one can just as easily run Julia code with this.

1 Like

I tried using the gui() function but it made a gif. What I want is for me to be able to see the graph update the moment the program changes any values. Do you happen to have any other suggestions? Thanks!

Hi, I looked at the examples. But the examples are showing the graphs inside the IDE. Is there anything that creates a separate window and updates the graph in real time like a gui?

gui with PyPlot for sure is an interactive GUI. GR.jl just doesn’t have interactivity yet.

Do you have any examples I can try out? Or a link to some examples?

I tried this code:

using Plots
pyplot() # Choose a backend
plot(rand(4,4)) # This will plot to the plot pane
gui() # This will open up a separate interactive GUI window

It seems like it just gets stuck while running

Sounds like an installation issue with the PyPlot backend.

Should I try to install it again?

Did you try

Pkg.add("PyPlot")
withenv("PYTHON" => "") do
    Pkg.build("PyPlot")
end

I tried it out but the above code still just keeps running

My bad, I misunderstood your question. Hydrogen won’t let you open and continuously update the file in a separate GUI.

Out of curiosity, why do you need to do it in a separate GUI? Ie. whats wrong with the graph being integrated into your editor?

I was trying to make a status bar window with a user interface I was working on so I thought it would be better to have a separate window to show the bars alongside the gui. But, I think the julia packages are kinda buggy right now so i’m just going to use the glade progress bars.

Can’t speak for the OP, but I much prefer to have a separate window for plotting. I think it’s because it lets me concentrate on the code, while tuning my figure, so I focus either on the plot or the code.