-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: Simplify some table markup #24756
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
Conversation
lib/matplotlib/style/core.py
Outdated
A path-like object which is a path to a style file. | ||
list | ||
A list of style specifiers (str, Path or dict) applied from first | ||
to last in the list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should one use this for the use
docstring as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Only a single comment that should be quite easy to fix, but also can be postponed.
lib/matplotlib/axes/_axes.py
Outdated
+-----+ | ||
| | | ||
+-----+ | ||
┌─────┐ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of like identifying the corners in some way. Are you able to change it to *---*
or some other identifier to get a distinct point at the corner? Right now this is just a box in the render and somewhat hard to identify exactly what the quantity in the parentheses is referring to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this one and the other one is this file should as they were.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. It doesn't look like there are any characters with a diagonal and a box corner. I tried using a diagonal off the corner
(X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
╲ ╱
┌─────┐
│ │
└─────┘
╱ ╲
(X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
or an arrow pointing to it
(X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
↘ ↙
┌─────┐
│ │
└─────┘
↗ ↖
(X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
but I don't really like them. Also tried a dot:
(X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
●─────●
│ │
●─────●
(X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sort of like the third one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also like the circles. It could be a bit confusing with the connected bars at the top but not the vertical making me think I'm perhaps missing something, but not a major issue either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unfortunately due to the rectangular nature of the monospace characters with the circle being vertically centred, so not much can be done there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless, is there maybe a half horizontal line character so that we can stop the line early?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, there is such a thing:
(X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
●╶───╴●
│ │
●╶───╴●
(X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
e830dd8
to
3c9aadf
Compare
These are not so complicated that they can't use simple tables, though in one case, I thought a definition list looked better.
This also fixes some broken diagrams due to incorrect code block setup.
3c9aadf
to
1ea9244
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good like this to me!
PR Summary
Our style guide is only against
csv-table
, but in these cases, there's no need to use a full grid table when a simple table works. Though in one case, I did replace with a definition list.I also replaced ASCII art "tables" with Unicode block characters. That commit also fixes some messed up display due to incorrect code blocks.
PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst