Skip to content

DOC: Simplify Line, Poly and RegularPoly example #30383

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

Merged
merged 1 commit into from
Aug 3, 2025

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Aug 3, 2025

  • use color kwarg instead of separate add_color()
  • remove autolim=True from add_collection() calls as that is the default anyway

- use `color` kwarg instead of separate `add_color()`
- remove `autolim=True` from `add_collection()` calls as that is the
default anyway
@github-actions github-actions bot added the Documentation: examples files in galleries/examples label Aug 3, 2025
Comment on lines -53 to -55
# Note: the first argument to the collection initializer
# must be a list of sequences of (x, y) tuples; we have only
# one sequence, but we still have to put it in a list.
Copy link
Member Author

Choose a reason for hiding this comment

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

This note is out of place it refers to LineCollection([spiral], ..., but I claim this is enough of a standard pattern that we don't need to mention it.

Comment on lines -57 to -62
# autolim=True enables autoscaling. For collections with
# offsets like this, it is neither efficient nor accurate,
# but it is good enough to generate a plot that you can use
# as a starting point. If you know beforehand the range of
# x and y that you want to show, it is better to set them
# explicitly, set the *autolim* keyword argument to False.
Copy link
Member Author

Choose a reason for hiding this comment

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

This is unclear: Why is it neither efficient nor accurate. I'm also not clear whether the statement is still correct. It's from 2006 and collection limit handling as improved since then. If anything we'd need an explicit discussion on limit handling for collections, but that's not the scope of this example. So let's remove this here.

@story645 story645 added this to the v3.10-doc milestone Aug 3, 2025
@story645 story645 merged commit a797f94 into matplotlib:main Aug 3, 2025
21 checks passed
Copy link

lumberbot-app bot commented Aug 3, 2025

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.10.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 a797f94441999180f2eddda808afec4fd03ac530
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #30383: DOC: Simplify Line, Poly and RegularPoly example'
  1. Push to a named branch:
git push YOURFORK v3.10.x:auto-backport-of-pr-30383-on-v3.10.x
  1. Create a PR against branch v3.10.x, I would have named this PR:

"Backport PR #30383 on branch v3.10.x (DOC: Simplify Line, Poly and RegularPoly example)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

Copy link

lumberbot-app bot commented Aug 3, 2025

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.10.5-doc
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 a797f94441999180f2eddda808afec4fd03ac530
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #30383: DOC: Simplify Line, Poly and RegularPoly example'
  1. Push to a named branch:
git push YOURFORK v3.10.5-doc:auto-backport-of-pr-30383-on-v3.10.5-doc
  1. Create a PR against branch v3.10.5-doc, I would have named this PR:

"Backport PR #30383 on branch v3.10.5-doc (DOC: Simplify Line, Poly and RegularPoly example)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@timhoffm timhoffm deleted the doc-collection-example branch August 3, 2025 20:27
@timhoffm
Copy link
Member Author

timhoffm commented Aug 3, 2025

Manual backport is not worth the effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: examples files in galleries/examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants