-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Include scatter plots in Qt figure options editor. #12779
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
Include scatter plots in Qt figure options editor. #12779
Conversation
if images: | ||
datalist.append((images, "Images", "")) | ||
if sms: | ||
datalist.append((sms, "Images, etc.", "")) |
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.
Suggestions for the user-facing label here are welcome.
731ad32
to
34b74da
Compare
label = image.get_label() | ||
# Get ScalarMappables. | ||
smdict = {} | ||
for sm in [*axes.images, *axes.collections]: |
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.
sm
is a quite obscure name and not used anywhere else in the code.
I'd prefer mappable
or smappable
.
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.
done
34b74da
to
6ffa253
Compare
label = image.get_label() | ||
if label == '_nolegend_': | ||
# Get ScalarMappables. | ||
mappabledict = {} |
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.
Would probably do mappable_*
instead of mappable*
on compounds for better readability.
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.
There's also curvedict/curvedata/etc. for Line2D instances (just above), so if you want to get to change both of them...
for image in axes.get_images(): | ||
label = image.get_label() | ||
if label == '_nolegend_': | ||
# Get ScalarMappables. |
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.
Minor formatting nitpicking. I think we would usually do # get ScalarMappables
. Same with the set
below.
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 capitalize (nearly) all my comments and include final stops (Matplotlib or not)...
6ffa253
to
812d826
Compare
Essentially all the image-handling code can be reused; the only difference is that collections don't have an `interpolation` field so we need to check for that. The rest of the PR is just replacing "image" by "sm" ("ScalarMappable") throughout...
812d826
to
3c345ec
Compare
Essentially all the image-handling code can be reused; the only difference is that collections don't have an `interpolation` field so we need to check for that. The rest of the PR is just replacing "image" by "sm" ("ScalarMappable") throughout...
* upstream/master: (1723 commits) Correctly get weight & style hints from certain newer Microsoft fonts (matplotlib#12945) Remove some checks for Py<3.6 in the test suite. (matplotlib#12974) Fail-fast when trying to run tests with too-old pytest. Include scatter plots in Qt figure options editor. (matplotlib#12779) ENH: replace deprecated numpy header Minor simplifications. tickminorvisible-fix (matplotlib#12938) Remove animated=True from animation docs Update the documentation of Cursor Misc. cleanups. Add test for 3d conversion of empty PolyCollection Support ~ as nonbreaking space in mathtext. Deprecate public use of Formatter.pprint_val. MAINT: Unify calculation of normal vectors from polygons (matplotlib#12136) Fix the title of testing_api More table documentation Simplify bachelors degree example using new features. Avoid pyplot in showcase examples. Simplify argument checking in Table.__getitem__. (matplotlib#12932) Minor updates following bump to Py3.6+. ... # Conflicts: # lib/matplotlib/widgets.py
Essentially all the image-handling code can be reused; the only
difference is that collections don't have an
interpolation
field so weneed to check for that.
The rest of the PR is just replacing "image" by "sm" ("ScalarMappable")
throughout...
PR Summary
PR Checklist