Skip to content

Tick and axis thickness #4

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

Open
gabrielastro opened this issue Jul 13, 2024 · 3 comments
Open

Tick and axis thickness #4

gabrielastro opened this issue Jul 13, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@gabrielastro
Copy link

First of all, thank you so much for making this available! A small thing: could you please make the axes and ticks thicker, more similar to the thickness of the characters? Currently, the axes are too thin, which does not look so nice and is not the classical look.

Separately, could you add a quick pointer to the README on how to use Hershey Simplex if this is easy? Just to have the option. Thanks!

By the way, I am advertising your package to colleagues 😄 and in my papers (see p. 9 of https://ui.adsabs.harvard.edu/abs/2024ApJ...964...70M for Fig. 6 and the acknowledgements) 🤓.

@gabrielastro
Copy link
Author

gabrielastro commented Jul 13, 2024

I have discovered where this is getting set: in src/smplotlib/smplot.mplstyle, with axes.linewidth: 0.7 # edge line width currently. Using axes.linewidth: 1.0 gives the right look. Currently, I load smplotlib but then have to do

import matplotlib
matplotlib.rcParams['axes.linewidth'] = 1.;

to correct this…

On a related note, for the classical (and, I think, better style), one should set:

axes.formatter.useoffset : False
axes.formatter.limits    : -4,4    # or maybe -5,5

to avoid this strange multiplicative (or additive) factor at the top of the axis. (If dividing out a factor is needed, it is clearer to do it "by hand" and indicate it in the axis label, e.g.: r'Mass ($10^3 M_{\mathrm{Sun}}$)' and plot data.mass/1e3.)

@AstroJacobLi
Copy link
Owner

This is awesome!! Thank you for using the package and even citing it in your paper! I really appreciate it. I'll take a look at your suggestion/question in a bit when I have time. Will keep you updated.

@AstroJacobLi AstroJacobLi added the enhancement New feature or request label Jul 13, 2024
@gabrielastro
Copy link
Author

gabrielastro commented Jul 16, 2024

By the way, I have not tested extensively the thickness (1.0 is probably ok, but to be checked), and for the logarithms: between 0.0001 and 10000 inclusively, the numbers should be written out, and for higher or small powers it makes sense to use the exponential notation. This is roughly the (sensible) behaviour of IDL or gnuplot, for instance (and maybe SM but I do not know). This could possibly be checked more precisely, but the main thing is to avoid those silly axes with "10⁻¹, 10⁰, 10¹" instead of just "0.1, 1, 10"… Probably, axes.formatter.min_exponent = 5 would be good.

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

No branches or pull requests

2 participants