orbitize
orbitize copied to clipboard
Setting elegant default plotting settings
Congratulations on your orbitize! v3 paper on arXiv! Maybe v3 would be a good point to set pretty default settings for the plots :)? My main recommendations are:
-
Use mirror ticks (i.e., ticks on the right and top): it also makes reading off values so much easier, especially for curves close to those edges.
-
Use minor ticks: also very useful for reading off values, and elegant.
-
Use a bigger font size: in a paper, it is not practical to have to zoom in just to read the axes and/or the values… The trick is here actually to make the figures intrinsically smaller, so that the elements are bigger relative to the plot and thus the page.
-
This one is more subjective but a prettier font than the default one would be nice. There are many options that are elegant and legible. I am not a
python
programmer but from what I can tell, looking at the source of species, it is as simple as doing:
import matplotlib.pyplot as plt
…
plt.rcParams["font.family"] = "serif"
plt.rcParams["mathtext.fontset"] = "dejavuserif"
I do not mean that you need to take same font—even though you could, of course. Just make sure that the text and math fonts look similar; otherwise, one gets ugly mixes e.g. within a label. If you want to go for the classical Hershey Complex font, there is smplotlib (as simple as: import smplotlib; matplotlib.rcParams['axes.linewidth']=1.
because the default is (currently) too thin), and in general there is more of this kind of advice under https://turnermoni.ca/python3.html. Make sure also to use a plot border thickness that goes well with the font.
Describe alternatives you've considered Non-prettiness is not an alternative :wink:.
Thanks for considering this! It would make your code even more attractive to readers who are not users… yet. I do not know how you can set the settings centrally to give the plots a consistent look but maybe there is an easy solution!