queryverse / ElectronDisplay.jl

An Electron.jl based figure and table display.
Other
85 stars 17 forks source link

loose ends with plots/gr #16

Open lewisl opened 5 years ago

lewisl commented 5 years ago

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 commented 5 years ago

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

lewisl commented 5 years ago

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 notifications@github.com Reply-To: "queryverse/ElectronDisplay.jl" reply@reply.github.com Date: Tuesday, February 26, 2019 at 8:41 PM To: "queryverse/ElectronDisplay.jl" ElectronDisplay.jl@noreply.github.com Cc: Lewis Levin lewis@neilson-levin.org, Author author@noreply.github.com 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.

davidanthoff commented 5 years ago

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 commented 5 years ago

I think this is GR side

lewisl commented 5 years ago

Thanks for following up!

From: David Anthoff notifications@github.com Reply-To: "queryverse/ElectronDisplay.jl" reply@reply.github.com Date: Wednesday, February 27, 2019 at 11:11 AM To: "queryverse/ElectronDisplay.jl" ElectronDisplay.jl@noreply.github.com Cc: Lewis Levin lewis@neilson-levin.org, Author author@noreply.github.com 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.

jheinen commented 5 years ago

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

mkborregaard commented 5 years ago

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

mkborregaard commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

davidanthoff commented 5 years ago

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 commented 5 years ago

can you close the electron window programmatically?

On Feb 27, 2019, at 3:09 PM, David Anthoff notifications@github.com<mailto:notifications@github.com> 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.

davidanthoff commented 5 years ago

can you close the electron window programmatically?

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

jheinen commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

From: Josef Heinen notifications@github.com Reply-To: "queryverse/ElectronDisplay.jl" reply@reply.github.com Date: Wednesday, February 27, 2019 at 7:16 PM To: "queryverse/ElectronDisplay.jl" ElectronDisplay.jl@noreply.github.com Cc: Lewis Levin lewis@neilson-levin.org, Mention mention@noreply.github.com 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 commented 5 years ago

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 notifications@github.com Reply-To: "queryverse/ElectronDisplay.jl" reply@reply.github.com Date: Wednesday, February 27, 2019 at 4:40 PM To: "queryverse/ElectronDisplay.jl" ElectronDisplay.jl@noreply.github.com Cc: Lewis Levin lewis@neilson-levin.org, Mention mention@noreply.github.com 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.