Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting elegant default plotting settings #378

Open
gabrielastro opened this issue Sep 23, 2024 · 0 comments
Open

Setting elegant default plotting settings #378

gabrielastro opened this issue Sep 23, 2024 · 0 comments

Comments

@gabrielastro
Copy link

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:

  1. 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.

  2. Use minor ticks: also very useful for reading off values, and elegant.

  3. 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.

  4. 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 😉.

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant