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

plotting generates a blank window #124

Open
dav2017 opened this issue Jul 11, 2018 · 25 comments
Open

plotting generates a blank window #124

dav2017 opened this issue Jul 11, 2018 · 25 comments

Comments

@dav2017
Copy link

dav2017 commented Jul 11, 2018

Something changed in the past weeks. When I plot data, now I get a blank window opens displaying no plot (but no error at REPL prompt). I tried different plot commands (plot, histogram), eg.:

using  GR
histogram(randn(1000)

I am running GR v. 0.31.0 and Julia v. 0.6.3 on Debian GNU/Linux.

@jheinen
Copy link
Owner

jheinen commented Jul 11, 2018

What's the output of the GR version() command?

@dav2017
Copy link
Author

dav2017 commented Jul 11, 2018

GR.version() returns "0.31.0".

A further information: I experienced the problem both using GR directly and as a backend of Plots (while Plots+pyplot is working as expected).

@jheinen
Copy link
Owner

jheinen commented Jul 11, 2018

Is the "blank" window a QtTerm? @FlorianRhiem : Can you reproduce this behaviour?

In any case, could please you try to:

ENV["GRDIR"]=""
Pkg.build("GR")

@dav2017
Copy link
Author

dav2017 commented Jul 11, 2018

The window is named GKS QtTerm.
After executing

ENV["GRDIR"]=""
Pkg.build("GR")

nothing changed (I closed and reopened the REPL and tried to plot something).

@jheinen
Copy link
Owner

jheinen commented Jul 11, 2018

... but you can create figures etc, right?

savefig("hist.pdf")

@dav2017
Copy link
Author

dav2017 commented Jul 11, 2018

Yes, savefig properly generates files (with graph drawn in them).

@dav2017
Copy link
Author

dav2017 commented Jul 11, 2018

Also, if I use GR within the Jupyter notebook the plot is correctly displayed.

@dav2017
Copy link
Author

dav2017 commented Jul 12, 2018

I did some more checking. The problem seems related to tiling window managers (dwm, i3): the window is blank if it is opened in tiled mode (and after that no window reshaping or making it float can make it usable for plotting). Instead, if the window is opened as a floating window it properly display the graph (and if I move to tiling mode it keeps working).
In the past it used not to be like that, I do not know what changed now, if my window manager configuration or the Qt term.

@jheinen
Copy link
Owner

jheinen commented Jul 12, 2018

Thanks for your hints. I will check this next week when I have access to a Debian machine - I'm currently on a conference.

@korantir
Copy link

Same problem with Win10, Atom 1.28.2, GR v. 0.31.0 and Julia 0.6.3, everything run properly, but no plotting in Atom Plots window. Was good week ago. Seems like something changed with latest atom releases, but i'm not sure because latest atom patch changed nothing about plotting at all.

@jheinen
Copy link
Owner

jheinen commented Jul 18, 2018

Works fine for me with macOS 10.14, Atom 1.28.2, GR master and Julia 0.6.4. Do you have a chance to test it on a Mac?

atom

@jheinen
Copy link
Owner

jheinen commented Jul 18, 2018

@dav2017 : unfortunately, I don't have access to a Debian box with a tiling WM. Will have to setup a VM for it ...

@korantir
Copy link

Well, I tried all rebuilds etc. Installed julia 0.6.4. All these methods didn't help. Although, for now I have error from issue nearby: "GKS: svgplugin.dll: can't load library, error 126 (0x7e)" and previous solution does not help.
BTW on another win machine with latest atom, gr and julia 0.6.0 everything work properly. Sooo I'm quite sure that it is only my problem with GKS/GR build. I'll try to figure it out myself. Thanks for your quick answers @jheinen And for all your work too
P.S. Sadly I have no Mac.

@jheinen
Copy link
Owner

jheinen commented Jul 19, 2018

Could you please enter a command window (cmd.exe), change to the directory to where svgplugin.dll is located (..\GR.jl\deps\gr\bin) and invoke the following command:

dumpbin /dependents svgplugin.dll

screen shot 2018-07-19 at 12 17 06

@korantir
Copy link

korantir commented Jul 19, 2018

cmd_2018-07-19_15-34-17
I have feeling that something with path is wrong, but i don't have enough time to check code

for now path to svgplugin.dll is C:\Users\Administrator.julia\v0.6\GR\deps\gr\bin

where Administrator is cyrillic, hope it doesn't matter.

dumps look equal for us

@pkofod
Copy link

pkofod commented Aug 12, 2018

https://discourse.julialang.org/t/precompiling-plots-jl-fails-on-julia-1-0/13232/25

could this be related? read the last part of the discussion

@DoktorMike
Copy link

DoktorMike commented Aug 12, 2018

I'm the one who posted that question, and I'm also on a tiling WM (i3wm) on Ubuntu 17.10. I will try to run it using GNOME and see if it works there.

==EDIT==
I can confirm that Plots and GR works on my machine when in Gnome. Thus for me it is an issue with my tiling window manager. I have no idea why though.

@RaulDurand
Copy link

I can confirm that Plots and GR works on my machine when in Gnome. Thus for me it is an issue with my tiling window manager. I have no idea why though.

Same problem here with i3wm

@dav2017
Copy link
Author

dav2017 commented Sep 17, 2018

For i3wm (and dwm) a work-around is to open GR plot windows in floating mode. You can edit the i3 "config" file to automatically open these windows as floating. Add this line to the config file (which in Debian is in ~/.config/i3/):
for_window [class="gksqt"] floating enable
which works both for GR and gr() via Plots.

@c42f
Copy link

c42f commented Oct 10, 2018

The for_window workaround worked for me (on ubuntu 18.04 + i3wm). Some observations:

The lib/gks/demo application from GR itself shows the same blank window behavior without the for_window workaround, so this is unlikely related to GR.jl itself, this is probably a GR + tiling WM issue.

With GR.jl:

If the floating GR window is sent to the tiled layer, the plot resizes correctly. However, new plots in the tiled window are the size of the original floating window and the remaining part of the tiled window is not redrawn.

Also

  1. If the for_window workaround is enabled
  2. GR is started and a plot created
  3. the for_window workaround is disabled
  4. subsequent plots in now automatically tiled windows work ok.

@ctkelley
Copy link

I am having the same problem on a Mac with Julia 1.1. Everything was fine until I tried to use PlotlyJS.

@jheinen
Copy link
Owner

jheinen commented Apr 15, 2019

I have no idea why a PlotlyJS installation should affect GR.
So simple things like:

using  GR
histogram(randn(1000))

are no longer working after you added PlotlyJS?

@ctkelley
Copy link

I did a reinstall from scratch and the problem went away.

@floswald
Copy link

floswald commented Mar 3, 2021

I'm still with this problem on Mac OS. I rebuilt GR several times. thanks for any help!

➜  ~ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.3 (2020-11-09)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using GR

julia> version()
"0.55.0.post5"

julia> histogram(randn(100))

julia> versioninfo()
Julia Version 1.5.3
Commit 788b2c77c1 (2020-11-09 13:37 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, haswell)
Environment:
  JULIA_EDITOR = sublime

julia> 

Screenshot 2021-03-03 at 10 46 26

@floswald
Copy link

floswald commented Mar 3, 2021

what's really weird is that in VScode that works totally fine.

Screenshot 2021-03-03 at 10 53 50

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

9 participants