Skip to content
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

loose ends with plots/gr #16

Open
lewisl opened this issue Feb 27, 2019 · 17 comments
Open

loose ends with plots/gr #16

lewisl opened this issue Feb 27, 2019 · 17 comments

Comments

@lewisl
Copy link

lewisl commented Feb 27, 2019

Try:
using Plots
using ElectronDisplay
plot(1:4,11:14) # boring plot

For a moment, the gtk window appears as drawn by gr. Then it is replaced by the electron window. But, not really. The electron window gets the foreground. GTK is still running.

One cannot close the electron window. plots closeall() function no longer works, which means that gr figure is also still hanging around.

Look at the source code quickly. Seemingly, no way to manage the gui window. Guess it hangs around indefinitely.

Golly, gosh. Sigh. Early days.

@davidanthoff
Copy link
Member

What platform are you on? I can't replicate this on Windows.

@lewisl
Copy link
Author

lewisl commented Feb 27, 2019 via email

@davidanthoff
Copy link
Member

Ah, I can replicate it on Mac!

I think there must be going something wrong on either the Plots.jl or GR.jl side of things here. ElectronDisplay.jl just hooks into the standard display stack of julia. It is not clear to me why Plots/GR would actually open a Gtk window in that case at all. @daschw, @mkborregaard and @jheinen, any idea what is happening here?

@mkborregaard
Copy link

I think this is GR side

@lewisl
Copy link
Author

lewisl commented Feb 27, 2019 via email

@jheinen
Copy link

jheinen commented Feb 27, 2019

I have never used ElectronDisplay.jl, neither with Plots nor with GR. Will hopefully find some time to check it ...

@mkborregaard
Copy link

I'm guessing @lewisl means gks window not gtk?

@mkborregaard
Copy link

If it's about the display stack then that is not GR - Plots handles that here: https://github.com/JuliaPlots/Plots.jl/blob/master/src/init.jl#L22-L29

@jheinen
Copy link

jheinen commented Feb 27, 2019

I can't reproduce the behaviour. The only problem is this useless GKS window showing up and disappearing immediately. After that, everything works as expected (on my Mac 10.14.4 Beta).

@jheinen
Copy link

jheinen commented Feb 27, 2019

I'll make further tests when I'm in my office ...

@davidanthoff
Copy link
Member

I should add that I only partially reproduce the original case, i.e. the GKS (or was it a GTK, don't remember) window pops up and I think also stays around in the activity bar below? I can interact with the Electron window.

So yes, the only "problem" might be taht this GKS window shows up when it isn't really necessary.

@lewisl
Copy link
Author

lewisl commented Feb 28, 2019 via email

@davidanthoff
Copy link
Member

can you close the electron window programmatically?

No, we don't have an API for that right now. PRs welcome :)

@jheinen
Copy link

jheinen commented Feb 28, 2019

So yes, the only "problem" might be taht this GKS window shows up when it isn't really necessary.

It doesn't happen in plain GR, so we have to look into the Plots logic.

BTW: multi-window support will be available once the qtterm and jsterm are finished.

@mkborregaard
Copy link

There used to be an issue with GR windows constantly opening and closing when saving gifs from Plots. I don't think Plots explicitly opens GR windows though.

@lewisl
Copy link
Author

lewisl commented Feb 28, 2019 via email

@lewisl
Copy link
Author

lewisl commented Feb 28, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants