-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: update anatomy of figure #21753
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
examples/showcase/anatomy.py
Outdated
ax.add_artist(circle) | ||
|
||
|
||
def text(x, y, text): | ||
ax.text(x, y, text, backgroundcolor="white", | ||
ha='center', va='top', weight='bold', color='blue') | ||
ax.text(x, y, text, backgroundcolor=(1, 1, 1, 1), zorder=100, |
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.
Perhaps replace backgroundcolor by something like bbox={"fc": (1, 1, 1, .75)}
(or even {'fc': 'w'}
); the borderless, implicit white rectangles around text look a bit weird otherwise. Or use the same path_effect as circle
does, to just add a bit of blank spacing around the glyphs only.
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 call - the stroke effect around the lettering works really well. See the updated plot above...
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.
lgtm, but I guess I'll let @rougier do the approval here.
8679eaf
to
bbbce2b
Compare
BTW ping @rougier as I think you made the original. If you want to have a go at updating this, I'm sure no one would object! |
I like it a lot. However, if you're going to mention |
c434340
to
7817b35
Compare
I agree that |
Well strictly speakting, this mostly shows the anatomy of an Axes, not a Figure. Maybe we can have a plot "Anatomy of a Figure" showing two Axes (subplots) and a Figure title (maybe also wspace) and another one "Anatomy of an Axes" like the one above but with just one curve with markers? Also maybe it's worth to denote the Axis with a big rounded rectangle including the ticks and tick labels instead of the circle, otherwise it's a bit unclear how an Axis differs from a spine. Just a concept, needs to be fine tuned and the additional figure text and the axes legends etc. maybe too confusing and the color is certainly not optimal (the left Axes color = the right Figure color to show correspondence). The main idea was to show what belongs to a Figure and what to an Axes. (code see this gist) |
I thought of using colors, but then the little circle illusion becomes confusing rather than helpful. Certainly one could come up with other versions of this, but it is a venerable figure, so I was loathe to change it too substantially. I would vote to stay with "Anatomy of a Figure". Everyone knows what a "Figure" is, whereas "Axes" is more jargonny, and indeed part of what this figure is meant to demonstrate. |
I'd also say, let's stick to this style-updated version of the current figure for now. We can always make further changes later. |
7817b35
to
c5c8996
Compare
c5c8996
to
b2c2ebf
Compare
Merged. There has been enough time to speak up against this. |
…753-on-v3.5.x Backport PR #21753 on branch v3.5.x (DOC: update anatomy of figure)
…753-on-v3.5.0-doc Backport PR #21753 on branch v3.5.0-doc (DOC: update anatomy of figure)
AArrg, too late but:
|
|
These were just aesthetic choices. But I'm not trying to claim I have any taste, just the very old version was outdated.
Yes, I can see a few of them are a bit off
To indicate that it is code?
Aesthetic choice again - I thought it useful differentiate the plot elements and the annotations. |
I would prefer to minimize changes for a first update and the we can discuss further changes. Obviously my aesthetic choices are a bit different than yours (and it's fine) but I would prefer we dicuss them a bit more before making changes. |
Sure, well lets just revert, and consider this an open issue that the old version could use some freshening. |
I agree that figure need some update. Let's start with the updated version and check if we can change this or that aspecT. |
This is definitely your figure, so happy to approach it how you would like! |
PR Summary
I have taken the liberty of tweaking the colors and fonts of this venerable graphic to something more in keeping with the current style.
Current:
Suggested:
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).