Include scatter plots in Qt figure options editor.#12779
Include scatter plots in Qt figure options editor.#12779timhoffm merged 1 commit intomatplotlib:masterfrom
Conversation
| if images: | ||
| datalist.append((images, "Images", "")) | ||
| if sms: | ||
| datalist.append((sms, "Images, etc.", "")) |
There was a problem hiding this comment.
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.
sm is a quite obscure name and not used anywhere else in the code.
I'd prefer mappable or smappable.
34b74da to
6ffa253
Compare
| label = image.get_label() | ||
| if label == '_nolegend_': | ||
| # Get ScalarMappables. | ||
| mappabledict = {} |
There was a problem hiding this comment.
Would probably do mappable_* instead of mappable* on compounds for better readability.
There was a problem hiding this comment.
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.
Minor formatting nitpicking. I think we would usually do # get ScalarMappables. Same with the set below.
There was a problem hiding this comment.
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
interpolationfield so weneed to check for that.
The rest of the PR is just replacing "image" by "sm" ("ScalarMappable")
throughout...
PR Summary
PR Checklist