I would like to set the default plotting style, e.g., default(grid=:off, box=:on), when using Plots.jl to avoid doing it every time when I need to use it.
putting it in startup.jl doesn’t work as an error occurs. So where is the right place?
ERROR: LoadError: UndefVarError: default not defined
Stacktrace:
[1] top-level scope
@ C:\Users\xxx\.julia\config\startup.jl:1
in expression starting at C:\Users\xxx\.julia\config\startup.jl:1
I would say at the top of each script. If you want to call default, you need to have Plots loaded. And putting using Plots in your startup is probably not something you want.
You can define a mydefaults constant in startup, and do default(mydefaults...) if you want.
That seems to require Plots.jl to be loaded at startup.
I would try something more generic like:
:legend_background_color => :transparent
You need to test the exact syntax required and also remove the frame around the legend, I guess. But do not know now how to do partial transparency easily in startup.jl. To think about.