Plots.jl styling vs. GR

Hi there,

I really enjoy Plots and GR (independently and as a backend for Plots). Thanks to the devs for putting all that love into it.

Up until now I’ve used whatever suited my specific plotting needs but I’m starting to move towards Plots as my main tool.
However, I personally like the default style/theme of GR better than Plots and would like to get that with Plots as well. See examples:

using Plots, GR
x = 0:0.1:4pi
y = sin.(x)
GR.plot(x,y)
# or
Plots.plot(x,y)

Output from GKSTerm with GR
55

Output from GKSTerm with Plots
46

This is purely aesthetics but is it something I can change in Plots?

versioninfo()
Julia Version 0.6.0
Commit 903644385b (2017-06-19 13:05 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, skylake)

Thanks in advance,
Oliver

No, but it’d be great to have better themes support in PlotThemes that would allow Plots to emulate the themes from the backends. You can get part of the way by using Plots attributes, but e.g. Plots does not support minor tick marks. It’s an important discussion - how lightweight should Plots be in its interaction with the backends?

This is slightly closer:

plot(sin, 0, 4π, ylim = (-1,1), c = :navy, legend = false, size = (530,390), xticks = 0:5:10, framestyle = :box, tickfont = font(9))

05

Some of these attributes could be set as defaults. Minor tick marks… maybe that would be cool to have?

3 Likes

Thanks for the quick reply!

Yes would be nice to have something like that in PlotThemes. I wonder if that would require a lot of trial-and-error or we could infer some knowledge from the backends…