docs: add section on Pint and Matplotlib axis labelling integration#116
docs: add section on Pint and Matplotlib axis labelling integration#116Forma-Damian wants to merge 3 commits into
Conversation
|
🚀 reviewers: @j-parszutowicz & @orzel320 |
j-parszutowicz
left a comment
There was a problem hiding this comment.
The section fits the assigned topic, clearly explaining the benefits of automating labels. The length is optimal and the core concept is easy to grasp for beginners. Here is the first half of a checklist:
-
Topic match: Perfect. It directly addresses the issue of automating Matplotlib labels with Pint.
-
Screenshot:
-
Page limit: Looks good, fits nicely within the 1-page target.
-
Understandability: The text is accessible. But check the tag - it seems like it does not work for me (#link-to-pint-intro-section).
-
Code completeness: it might be worth adding standard imports (numpy, pyplot) to the snippet so it's fully copy-pasteable for students. Also, adding ax.legend() before showing the plot will make the labels you defined actually visible.
-
Plot fonts: The axis titles and tick numbers are noticeably larger than the main body text. Scaling them down would make the typography consistent.
-
Captions: The plot is missing a figure number and caption.
-
Vector graphics: The plotting cell is missing a format directive (like #| fig-format: pdf), meaning it likely defaults to a standard raster image (PNG) instead of a vector format.
-
Technology names: I noticed you used \techword{Pint} and \techword{Matplotlib} in the title, but standard bold text (Pint) in the markdown body. Consider keeping the \techword{} macro consistent throughout the text to match the small-caps guideline.
-
Typographic errors: The text looks clean and reads well.
It could be helpful for beginners to add a tiny inline comment explaining what the "~P" format string does.
To emphasize the automation aspect, you could add one sentence pointing out that if someone changes the input data unit later, the plot label will update automatically.
orzel320
left a comment
There was a problem hiding this comment.
The pull request is on topic and of good quality. It seems that the few concerns that were present have already been addressed by Jan, but there are some thing on the checklist that were not mentioned, so I will look over them.
- The listing and plots fit in the page margins
- The sections placement in the PDF is appropriate
- Authors full name doesn't seem to be added to colophon
- The notes mentioned in issue were addressed
- The K.I.S.S principle doesn't seem to violated
- The code is independent of OS
- Git workflow seems to be sane
Closes #61
This PR introduces a new section to the handbook demonstrating how to use Pint with Matplotlib.
Features included in the single-page visualization:
ureg.formatter.default_format = "~P".(m)).