Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ENH: Add path simplification to FillBetweenPolyCollection #1

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

Open
wants to merge 133 commits into
base: main
Choose a base branch
from

Conversation

Karunya1007
Copy link

Summary

This PR applies path simplification to FillBetweenPolyCollection, similar to how Line2D uses it.

Implementation

  • Added use of Path.cleaned(simplify=threshold) inside _make_verts_for_region.
  • Controlled by rcParams: path.simplify and path.simplify_threshold.
  • Behavior follows Line2D's path simplification logic.

PR checklist

asmeurer and others added 30 commits May 8, 2024 16:20
This allows specifying the output base name of the generated image files. The
name can include '{counter}', which is automatically string formatted to an
incrementing counter. The default if it is not specified is left intact as
the current behavior, which is to use the base name of the provided script or
the RST document.

This is required to use the plot directive with MyST, because the directive is
broken with MyST (an issue I don't want to fix), requiring the use of
eval-rst. But the way eval-rst works, the incrementing counter is not
maintained across different eval-rst directives, meaning if you try to include
multiple of them in the same document, the images will overwrite each other.
This allows you to manually work around this with something like

```{eval-rst}
.. plot::
   :output-base-name: plot-1

   ...
```

```{eval-rst}
.. plot::
   :output-base-name: plot-2

   ...
```

Aside from this, it's generally useful to be able to specify the image name
used for a plot, as a more informative name can be used rather than just
'<document-name>-1.png'.
The idea of allowing the use of the counter for custom base names is flawed
because the counter would always be incremented even for custom names that
don't use it. Also, the global base name is difficult to get working because
we don't have a good global view of the plots to create a counter, especially
in the case of partial rebuilds.

Instead, we just simplify things by just allowing setting a custom-base-name.
If two plot directives use the same custom-base-name, then one will end up
overwriting the other (I'm still looking into whether it's possible to at
least detect this and give an error).
Previously it would just overwrite one plot with the other.

I did not add tests for this because I would have to create a whole separate
docs build just to test the error (but I have tested it manually).
This will hopefully fix Sphinx trying and failing to include it.
Co-authored-by: Elliott Sales de Andrade <[email protected]>
…docs in tinypages

The tests now don't copy any of the build files, meaning the tests should pass
even if tinypages has stale build state from a manual build.
We now subset Type-1 fonts and no longer have a copy of ttconv.

Make the font comparison table a grid table so we can use a colspan
cell.

Clarify that Type-1 fonts get used only in the usetex/pdf combination.
ianlv and others added 29 commits July 2, 2025 15:54
chore: remove redundant words in comment
* WIP: changed FancyArrow empty logic

* Update test_patches.py

* Update test_patches.py

* Fix crash when drawing FancyArrow with zero length

* Update patches.py

* Delete .python-version
Upgrade to Visual Studio 2022 in appveyor.yml
They remain in `style.library`, because that's how we look them up, but
this prevents them being exposed as something someone might use.

Also, fix `reload_library`, which was accidentally modifying the
original base library information each time.

Fixes itprojects/MasVisGtk#13
Add explicit `**options: Any` for `add_subplot` method
Time out after 30 seconds. This is used for version queries which
should be very fast, so a 30-second delay would be unusual.

GitHub Actions test runs have been hanging trying to get the
inkscape version when using Python 3.14:

https://github.com/matplotlib/matplotlib/actions/runs/16043158943/job/45268507848#step:13:836
…ble-info

Time out in _get_executable_info
ruff uses `project.requires-python`, so the ruff-only `target-version`
is not needed.

Other exceptions can be dropped since they are all clear of warnings.
The removed excludes are covered by the first line. The Unpack feature
was enabled by default in 1.9, which is our minimum.
These examples only needed a single fix to remove the exception.
This also has the side-effect of casting torch Tensors to NumPy arrays,
which fixes matplotlib#30216. Since `stem` is made up of `plot` and `[hv]lines`
whic already do this cast, this just moves it up one level which
prevents doing it twice.
Make the difference between the two methods clearer (only the latter
takes clipping into account).
Tweak docstrings of get_window_extent/get_tightbbox.
Fix figure legend when drawing stackplots
Don't expose private styles in style.available
This was originally for i686 on Fedora, but is now applicable to WASM,
which is 32-bit. The older implementation doesn't OOM.
Use old stride_windows implementation on 32-bit builds
Copy link

@github-actions github-actions bot 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 week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.