ElectronDisplay.jl icon indicating copy to clipboard operation
ElectronDisplay.jl copied to clipboard

loose ends with plots/gr

Open lewisl opened this issue 6 years ago • 17 comments
trafficstars

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.

lewisl avatar Feb 27 '19 04:02 lewisl

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

davidanthoff avatar Feb 27 '19 04:02 davidanthoff

Tx. Mac: 10.14.3.

Interesting: so all should work. I can do a little bit more than the simple case to help diagnose. Let me know what would help. I’m on Julia 1.0.3 and all the packages are updated to latest versions.

From: David Anthoff [email protected] Reply-To: "queryverse/ElectronDisplay.jl" [email protected] Date: Tuesday, February 26, 2019 at 8:41 PM To: "queryverse/ElectronDisplay.jl" [email protected] Cc: Lewis Levin [email protected], Author [email protected] Subject: Re: [queryverse/ElectronDisplay.jl] loose ends with plots/gr (#16)

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/queryverse/ElectronDisplay.jl/issues/16#issuecomment-467721848, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABGLLW4__9-Jo-lUj1CO_t-W6-Fl6Ch3ks5vRgx-gaJpZM4bTqWp.

lewisl avatar Feb 27 '19 18:02 lewisl

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?

davidanthoff avatar Feb 27 '19 19:02 davidanthoff

I think this is GR side

mkborregaard avatar Feb 27 '19 19:02 mkborregaard

Thanks for following up!

From: David Anthoff [email protected] Reply-To: "queryverse/ElectronDisplay.jl" [email protected] Date: Wednesday, February 27, 2019 at 11:11 AM To: "queryverse/ElectronDisplay.jl" [email protected] Cc: Lewis Levin [email protected], Author [email protected] Subject: Re: [queryverse/ElectronDisplay.jl] loose ends with plots/gr (#16)

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. @daschwhttps://github.com/daschw, @mkborregaardhttps://github.com/mkborregaard and @jheinenhttps://github.com/jheinen, any idea what is happening here?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/queryverse/ElectronDisplay.jl/issues/16#issuecomment-467991542, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABGLLYUQ7uCnHtNB99S5iC6PWY0oB459ks5vRthogaJpZM4bTqWp.

lewisl avatar Feb 27 '19 19:02 lewisl

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

jheinen avatar Feb 27 '19 19:02 jheinen

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

mkborregaard avatar Feb 27 '19 20:02 mkborregaard

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

mkborregaard avatar Feb 27 '19 20:02 mkborregaard

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 avatar Feb 27 '19 20:02 jheinen

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

jheinen avatar Feb 27 '19 20:02 jheinen

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.

davidanthoff avatar Feb 27 '19 23:02 davidanthoff

can you close the electron window programmatically?

  • Lewis

On Feb 27, 2019, at 3:09 PM, David Anthoff <[email protected]mailto:[email protected]> wrote:

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/queryverse/ElectronDisplay.jl/issues/16#issuecomment-468067960, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABGLLTKCpi9BhHJVvEEeDiwOyzRi0CV1ks5vRxAigaJpZM4bTqWp.

lewisl avatar Feb 28 '19 00:02 lewisl

can you close the electron window programmatically?

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

davidanthoff avatar Feb 28 '19 00:02 davidanthoff

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.

jheinen avatar Feb 28 '19 03:02 jheinen

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.

mkborregaard avatar Feb 28 '19 07:02 mkborregaard

Makes sense. Problem with wrappers even when the API is quite nice.

From: Josef Heinen [email protected] Reply-To: "queryverse/ElectronDisplay.jl" [email protected] Date: Wednesday, February 27, 2019 at 7:16 PM To: "queryverse/ElectronDisplay.jl" [email protected] Cc: Lewis Levin [email protected], Mention [email protected] Subject: Re: [queryverse/ElectronDisplay.jl] loose ends with plots/gr (#16)

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/queryverse/ElectronDisplay.jl/issues/16#issuecomment-468121131, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABGLLa4eGHwrwYvqmxF1xEmP4LT6UM8cks5vR0n7gaJpZM4bTqWp.

lewisl avatar Feb 28 '19 19:02 lewisl

Kind of basic, isn’t it. So, need to look at the next level down at electron itself. I am not a JS developer. How hard to find that Electron API?

From: David Anthoff [email protected] Reply-To: "queryverse/ElectronDisplay.jl" [email protected] Date: Wednesday, February 27, 2019 at 4:40 PM To: "queryverse/ElectronDisplay.jl" [email protected] Cc: Lewis Levin [email protected], Mention [email protected] Subject: Re: [queryverse/ElectronDisplay.jl] loose ends with plots/gr (#16)

can you close the electron window programmatically?

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/queryverse/ElectronDisplay.jl/issues/16#issuecomment-468089101, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABGLLXaAYn2b1_oNfBP85NJGfAICfdTHks5vRyV6gaJpZM4bTqWp.

lewisl avatar Feb 28 '19 19:02 lewisl