Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

anntzer
Copy link
Contributor

Essentially all the image-handling code can be reused; the only
difference is that collections don't have aninterpolation field so we
need to check for that.

The rest of the PR is just replacing "image" by "sm" ("ScalarMappable")
throughout...

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code isFlake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzeranntzer added this to thev3.1 milestoneNov 8, 2018
ifimages:
datalist.append((images, "Images", ""))
ifsms:
datalist.append((sms, "Images, etc.", ""))
Copy link
ContributorAuthor

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.

@anntzeranntzerforce-pushed thescalarmappables-figureoptions branch from731ad32 to34b74daCompareNovember 8, 2018 20:48
label = image.get_label()
# Get ScalarMappables.
smdict = {}
for sm in [*axes.images, *axes.collections]:
Copy link
Member

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 prefermappable orsmappable.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

done

@anntzeranntzerforce-pushed thescalarmappables-figureoptions branch from34b74da to6ffa253CompareNovember 9, 2018 17:39
label = image.get_label()
if label == '_nolegend_':
# Get ScalarMappables.
mappabledict = {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Would probably domappable_* instead ofmappable* on compounds for better readability.

Copy link
ContributorAuthor

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.
Copy link
Member

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 theset below.

Copy link
ContributorAuthor

@anntzeranntzerNov 9, 2018
edited
Loading

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)...

Essentially all the image-handling code can be reused; the onlydifference 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...
@anntzeranntzerforce-pushed thescalarmappables-figureoptions branch from812d826 to3c345ecCompareDecember 10, 2018 20:22
@timhoffmtimhoffm merged commit8e72069 intomatplotlib:masterDec 10, 2018
@anntzeranntzer deleted the scalarmappables-figureoptions branchDecember 10, 2018 22:47
Stephen-Chilcote pushed a commit to Stephen-Chilcote/matplotlib that referenced this pull requestDec 11, 2018
Essentially all the image-handling code can be reused; the onlydifference 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...
raamana added a commit to raamana/matplotlib that referenced this pull requestDec 13, 2018
* 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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@efiringefiringefiring approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
v3.1.0
Development

Successfully merging this pull request may close these issues.

4 participants
@anntzer@efiring@timhoffm@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp