Currently trying to remove PyPlot from some of my old code and trying to move to Plots.jl, and while I’m generally positively surprised about how quickly I’ve been able to convert some basic plots, some things still stump me.
The first issue I would assume is due to my own inability to properly read the documentation: I can’t seem to be able to figure out how to adjust the font of axis labels - on the attributes page I can find fonts for legends, axis ticks, titles etc but not for the axis labels?
A second related question is how strings are handled for different backends. Consider the following example:
using Plots
plotlyjs()
plot(Plots.fakedata(100), xlabel="This needs a<br>linebreak")
gr()
plot(Plots.fakedata(100), xlabel="This needs a<br>linebreak")
Given the different formatting of strings in the two backends (GR using “regular” string formatting, while PlotlyJS relies on html tags), the correct display of the plot depends on which backend the user has installed.
What is the accepted way of solving this in Plots.jl? I could think of simply setting the backend explicitly in the code, or checking for the active backend and then constructing the string appropriately, but both don’t seem optimal to me!