GR in Atom: no labels, no ticks, no numbers on axes

I use GR to plot my data in Atom. When I plot something (whether it is from a Julia script or directly from the REPL) I get a graph with gridlines, but without labels, ticks and numbers on the axes. Hence, there is no scale. The plot is shown inside an Atom graph window.

I tried to find a solution, but without succes. Can you help?

Could you try GR master?

I get this error message on this line:

scatter(range(1,64;step=1),hxgbin)
[ Info: Recompiling stale cache file /Users/mrohde/.julia/compiled/v1.1/GR/NDU5Y.ji for GR [28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71]
ERROR: LoadError: error compiling #scatter#23: error compiling plot_data: error compiling send_meta: error compiling openmeta: could not load library "libGR.so"
dlopen(libGR.so.dylib, 1): image not found
Stacktrace:
 [1] scatter(::StepRange{Int64,Int64}, ::Vararg{Any,N} where N) at /Users/mrohde/.julia/packages/GR/PaF05/src/jlgr.jl:1528
 [2] #scatter#8(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::StepRange{Int64,Int64}, ::Vararg{Any,N} where N) at /Users/mrohde/.julia/packages/GR/PaF05/src/GR.jl:3073
 [3] scatter(::StepRange{Int64,Int64}, ::Vararg{Any,N} where N) at /Users/mrohde/.julia/packages/GR/PaF05/src/GR.jl:3073
 [4] top-level scope at none:0

So I did

Pkg> add GR#master

Please try to rebuild GR:

ENV["GRDIR"]=""
] build GR

There is something wrong with the GR run-time on your machine.

1 Like

After this I could compile and run the code. A graph is shown. Now there is another thing: the plot area has the dark-gray background (the same as my UI theme in Atom). Gridlines are white, the plot is blue and numbers along the axes are pure black (hence hardly visible). The desired situation would be a white plot area with black grid lines, axes and numbers, labels etc. and a plot in a certain color.

Also: zooming is not possible anymore.

Thanks for your help.

For now, you will have to manually change the color scheme.

using GR
setcolorscheme(2)
...

In a future version, I’ll probably try to change the color scheme depending on Atom’s settings…

How should I use this function? If I use setcolorscheme(2) in a script or in the REPL I get the message that it is an undefined function. Thanks.

Sorry, my mistake:

using GR
usecolorscheme(2)
1 Like

Perfect, thanks!