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

Revise scatter_masked.py#24409

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

Draft
hoffm386 wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromhoffm386:main
Draft

Conversation

hoffm386
Copy link

  • Expand introduction, including link to NumPy documentation
  • Simplify plot styling to avoid distraction and overlap
  • Add an example using a decision boundary style
  • Add references admonition at the end

PR Summary

Resolves#24357

PR Checklist

Tests and Styling

  • [N/A] Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • [N/A] New plotting related features are documented with examples.

Release Notes

  • [N/A] New features are marked with a.. versionadded:: directive in the docstring and documented indoc/users/next_whats_new/
  • [N/A] API changes are marked with a.. versionchanged:: directive in the docstring and documented indoc/api/next_api_changes/
  • [N/A] Release notes conform with instructions innext_whats_new/README.rst ornext_api_changes/README.rst

story645 reacted with hooray emoji
- Expand introduction, including link to NumPy documentation- Simplify plot styling to avoid distraction and overlap- Add an example using a decision boundary style- Add references admonition at the end
@oscargusoscargus added this to thev3.6-doc milestoneNov 9, 2022
Copy link

@github-actionsgithub-actionsbot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping@matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join uson gitter for real-time discussion.

For details on testing, writing docs, and our review process, please seethe developer guide

We strive to be a welcoming and open project. Please follow ourCode of Conduct.

@story645story645 self-assigned thisNov 10, 2022
Comment on lines +31 to +35
subplot_kw = {
'aspect': 'equal',
'xlim': (0, max(x)),
'ylim': (0, max(y))
}
Copy link
Member

Choose a reason for hiding this comment

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

I didn't know we could do this 😄 and I would maybe not put the comment here 'cause I think it makes it seem like this line has something to do w/ the masking specifically

Copy link
Author

Choose a reason for hiding this comment

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

It's a nice clean approach if you want to create two different plots with the same axes properties, rather than calling methods to set them 🙂

Fair point, what if I moved the comment like this:

subplot_kw= {'aspect':'equal','xlim': (0,max(x)),'ylim': (0,max(y))}fig,ax=plt.subplots(subplot_kw=subplot_kw)# Plot data points using masked arrayax.scatter(x,y,s=masked_size,marker='^',c="mediumseagreen")

story645 reacted with thumbs up emoji
@hoffm386
Copy link
Author

Built doc page forscatter_masked.py ishere

jklymak reacted with thumbs up emoji

Comment on lines +46 to +52

###############################################################################
# This technique can also be used to plot a decision boundary, rather than
# masking certain data points so that they don't appear at all. This example
# uses the same data points and boundary as the example above, this time in the
# style of a decision boundary.

Copy link
Member

Choose a reason for hiding this comment

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

I would tend to just be specific about what you are doing, but use general language. If you want the technical term yo think people will search on, by all means include it. Maybe something like:

Suggested change
###############################################################################
# This technique can also be used to plot a decision boundary, rather than
# masking certain data points so that they don't appear at all. This example
# uses the same data points and boundary as the example above, this time in the
# style of a decision boundary.
###############################################################################
# This technique can be used to plot two groups of data separated by a boundary (sometimes
# termed a "decision boundary"). This example uses two sets of masks to color the data on either
# side of the boundary differently, and adds a shape to define the boundary.

Copy link
Author

Choose a reason for hiding this comment

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

Ok gotcha, you're saying to use more general language to describe what theplotting code is doing. Not to explain theML concept in more general language. That makes sense!

@melissawm
Copy link
Member

Hi@hoffm386 - let us know if we can help you with this PR, thanks!

@QuLogicQuLogic modified the milestones:v3.6-doc,v3.7.0Jan 11, 2023
@tacaswelltacaswell modified the milestones:v3.7.0,v3.8.0Feb 9, 2023
@ksundenksunden modified the milestones:v3.8.0,v3.8-docAug 8, 2023
@story645
Copy link
Member

@hoffm386 just checking in if you have the bandwidth to finish this up (it looks pretty close to done for me) or if you're cool with it being taken over and finished out?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@story645story645story645 left review comments

@jklymakjklymakjklymak left review comments

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

At least 1 approving review is required to merge this pull request.

Assignees

@story645story645

Projects
Status: Waiting for author
Milestone
v3.8-doc
Development

Successfully merging this pull request may close these issues.

[Doc]: Revise "Scatter Masked" Example
8 participants
@hoffm386@melissawm@story645@jklymak@tacaswell@QuLogic@ksunden@oscargus

[8]ページ先頭

©2009-2025 Movatter.jp