Plots gr(): saving to file makes the on screen plot disappear forever

Hi,

I am experiencing an unexpected behavior when saving to file plots produced with Plots gr() backend, through the REPL.
When saving to file, the plot window on the screen disappears, and never comes back again when plotting new graphs (although saving to file those new graphs results in proper files with the expected plotting in them).
I found no way to get the plotting window back (I tried selecting a different backend and then choosing gr() again). The only way is to restart Julia.
On the contrary, with the pyplot() backend there is not such a problem.

My system:
Julia v. 0.6.2-pre.2
Plots v. 0.13.1
GR v. 0.24.0
Debian GNU/Linux v. 9.2 (current stable).

Thanks for suggestions,

Davide

As you can see, there are so many issues, let alone those pure GR issues. Plots is great because it’s stable, easy to use, compatible with many backends. I think it will be the future of julia plotting. However, it is still immature, either is the GR package.
If you are comfortable with matplotlib.pyplot, just use PyPlot.jl. It has more flexible features, better speed, better default plotting quality, and less issue.
I am sure i will go back to use Plots.jl someday, but today i recommend PyPlot.jl

Interesting: I’ve had the same issue for a while now but I thought it was a problem with my setup… It’s probably worth opening an issue on Plots.jl if there isn’t one already. A new plotting window with in interactivity is in the workings, but I don’t know the timeline.

As a workaround, you could try working in some IDE (VS code, Atom or Jupyter) where I believe Plots GR backend works smoothly.

https://github.com/jheinen/GR.jl/issues/20

Should be fixed in Plots #1258 (https://github.com/JuliaPlots/Plots.jl/pull/1258/commits/829ff7f09b80cd002b1be496f4c99967a49b35e6)
… and will be merged soon :slight_smile:

2 Likes

I’m aware that there are several issues. Some of them are simply missing features, some of them are specific to the gr() Plots backend code - not GR. If it’s a bug, I’ll do my best to fix it soon, but I can’t implement quick fixes for features that are implemented in a matplotlib-like style. Please keep in mind, that Plots’ design is much closer to PyPlot than to GR.

1 Like