DOC: Improve log scale example#29407
Conversation
timhoffm
commented
Jan 5, 2025
- Remove https://matplotlib.org/stable/gallery/scales/semilogx_demo.html It is redundant to the other log scale example.
- Explain that semilogx/semilogy/loglog are shortcuts.
- Tune data/visualization
|
Maybe this is nitpicky, but could we have a "plain" semilogy plot next to the semilogx one? I think the base 2 labeling is super useful to include, but it takes some interpretation. It'd be nice to have a semilogy plot that you can see at a glance what's going on, and then the base 2 labeling plot could be kept but moved down. It'd also be nice to have the minor gridlines turned on for one of these plots. |
|
Indeed a bit nitpicky. 😄 It's a bit the question of how much can you illustrate with an example. The original example had the base 2 on the loglog plot. I found this very unfortunate because (1) I've never seed double-log plots with different bases. That seems quite exotic. (2) to get that, one had to use I also think that adding minor grids here would be too cluttered. If we want to have all the aspects in, we probably need to structure the example into subsections:
|
|
However you want to slice it! I think it's definitely an improvement over what's there currently. |
6adabd3 to
2c399be
Compare
- Remove https://matplotlib.org/stable/gallery/scales/semilogx_demo.html It is redundant to the other log scale example. - Explain that semilogx/semilogy/loglog are shortcuts. - Tune data/visualization
2c399be to
39250fd
Compare
|
@scottshambaugh I've reworked the example. There's now one plot with semilogx/semilogy/loglog, also containing minor grids, as that makes it more obvious which directions are logarithmic. I've added separate examples |
|
I think this looks great, breaking it up into sections was a good move and the exposition helps a lot to interpret what's going on. Good to merge unless you want another reviewer! |
…407-on-v3.10.x Backport PR #29407 on branch v3.10.x (DOC: Improve log scale example)
…407-on-v3.10.0-doc Backport PR #29407 on branch v3.10.0-doc (DOC: Improve log scale example)
