Adding headers for examples/units for MEP12/sphinx-gallery compliance#8254
Adding headers for examples/units for MEP12/sphinx-gallery compliance#8254dstansby merged 1 commit intomatplotlib:masterfrom
Conversation
dstansby
left a comment
There was a problem hiding this comment.
Just some small changes to make, otherwise this all looks good 👍
| Artist tests | ||
| ============ | ||
|
|
||
| Test unit support with each of the matplotlib primitive artist types |
There was a problem hiding this comment.
Could you put a full stop at the end of this sentence?
There was a problem hiding this comment.
Also capitalize Matplotlib if you change this line.
|
|
||
| Test unit support with each of the matplotlib primitive artist types | ||
|
|
||
| The axes handles unit conversions and the artists keep a pointer to |
| Test unit support with each of the matplotlib primitive artist types | ||
|
|
||
| The axes handles unit conversions and the artists keep a pointer to | ||
| their axes parent, so you must init the artists with the axes instance |
There was a problem hiding this comment.
I would change this 'init' to the full 'initialize'...
| Bar demo with units | ||
| =================== | ||
|
|
||
| plot using a variety of cm vs inches conversions. The example shows |
There was a problem hiding this comment.
Also, spell out centimetre (inches is not abbreviated).
| ========================= | ||
|
|
||
| This is the same example as | ||
| <a href='http://matplotlib.org/examples/api/barchart_demo.html'> |
There was a problem hiding this comment.
I think there is probably a better way of linking between examples instead of using a hyperlink, but I can't think of how to at the moment.
There was a problem hiding this comment.
I don't think this works. Once we'll finish the migration to sphinx gallery, rst markup will work.
| Radian ticks | ||
| ============ | ||
|
|
||
| Plot with radians from the basic_units mockup example package |
There was a problem hiding this comment.
Could you add a full stop and a newline at the end of the first sentence?
| Artist tests | ||
| ============ | ||
|
|
||
| Test unit support with each of the matplotlib primitive artist types |
There was a problem hiding this comment.
Also capitalize Matplotlib if you change this line.
| Test unit support with each of the matplotlib primitive artist types | ||
|
|
||
| The axes handles unit conversions and the artists keep a pointer to | ||
| their axes parent, so you must init the artists with the axes instance |
There was a problem hiding this comment.
I would change this 'init' to the full 'initialize'...
|
|
||
| The axes handles unit conversions and the artists keep a pointer to | ||
| their axes parent, so you must init the artists with the axes instance | ||
| if you want to initialize them with unit data, or else they will not |
There was a problem hiding this comment.
... and 'initialize them with unit data' to 'use them with unit data'.
| # test a plain-ol-line | ||
| line = lines.Line2D([0*cm, 1.5*cm], [0*cm, 2.5*cm], lw=2, color='black', axes=ax) | ||
| line = lines.Line2D( | ||
| [0*cm, 1.5*cm], [0*cm, 2.5*cm], lw=2, color='black', axes=ax) |
There was a problem hiding this comment.
If this is too long, I'd break after the positional arguments instead; this doesn't look that great.
| # Not supported at present. | ||
| rect = patches.Rectangle((1*cm, 1*cm), width=5*cm, height=2*cm, alpha=0.2, axes=ax) | ||
| rect = patches.Rectangle( | ||
| (1*cm, 1*cm), width=5*cm, height=2*cm, alpha=0.2, axes=ax) |
| Bar demo with units | ||
| =================== | ||
|
|
||
| plot using a variety of cm vs inches conversions. The example shows |
There was a problem hiding this comment.
Also, spell out centimetre (inches is not abbreviated).
| =================== | ||
|
|
||
| plot using a variety of cm vs inches conversions. The example shows | ||
| how default unit instrospection works (ax1), how various keywords can |
There was a problem hiding this comment.
instrospection -> introspection
| @@ -1,8 +1,13 @@ | |||
| """ | |||
| ========== | |||
| Evans test | |||
There was a problem hiding this comment.
Who or what is "Evans"? Does anyone know? @tacaswell? I think this needs a different name.
There was a problem hiding this comment.
This all predates me. I assume someone from JPL
|
Cool, going to merge this in to get the titles in ready for sphinx-gallery, and open a new PR with the suggested cleanups. Thanks for the PR @yinleon ! |
|
wohoo! This section did not appear in our gallery. I'm going to try to add to the sphinx-gallery one. |
Adding headers for examples/units for MEP12/sphinx-gallery compliance
|
Backported to |
Changes in accordance to #7206