forked from matplotlib/matplotlib
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] main from matplotlib:main #22
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
pull
wants to merge
238
commits into
ishandutta2007:main
Choose a base branch
from
matplotlib:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Jody Klymak <jklymak@gmail.com>
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
This is shorter and more readable than defining them with single-use static functions positioned quite far away from the def_property_readonly calls.
`func` and `init_func` may return None (which is ok if `blit=False`). Since gating the allowed signature on the state of `blit` is not feasible, we err on the side on being too permissive in the type definition: Rather not flag a type error and only raise on runtime than complain on an actually working signature. Closes #29960.
Use inline lambdas to define most FT2Font properties.
In 89a7e19, an API for converting "dvi glyph indices" (as stored in a dvi file) to FreeType-compatible keys (either "indices into the native charmap" or "glyph names") was introduced. It was intended that end users (i.e., backends) would check the type of `text.glyph_name_or_index` ((A) int or (B) str) and load the glyph accordingly ((A) `FT_Set_Charmap(native_cmap); FT_Load_Char(index);` or (B) `FT_Load_Glyph(FT_Get_Name_Index(name));`); however, with the future introduction of {xe,lua}tex support, this kind of type checking becomes inconvenient, because {xe,lua}tex's "dvi glyph indices", which are directly equal to FreeType glyph indices (i.e. they would be loaded with `FT_Load_Glyph(index);`), would normally also be converted to ints. This PR introduces a new API (`Text.index`) that performs this mapping (via the new `DviFont._index_dvi_to_freetype`), always mapping to FreeType glyph indices (i.e. one can always just call `FT_Load_Glyph` on the result). To do so, in case (A) it loads itself the native charmap (something the end user needed to do by themselves previously) and performs the cmap-to-index conversion (`FT_Get_Char_Index`) previously implicit in `FT_Load_Char`; in case (B) it performs itself the name-to-index conversion (`FT_Get_Name_Index`). When {xe,lua}tex support is introduced in the future, `_index_dvi_to_freetype` will just return the index as is. The old APIs are not deprecated yet, as other changes will occur for {xe,lua}tex support (e.g. font_effects will go away and be replaced by `.font.effects`, as {xe,lua}tex don't store that info in the pdftexmap entry), and grouping all API changes together seems nicer (to only require a single adaptation step by the API consumer).
FIX: Typing of FuncAnimation
* DOC: Improve NonUniformImage docs * Update lib/matplotlib/image.py Co-authored-by: David Stansby <dstansby@gmail.com> --------- Co-authored-by: David Stansby <dstansby@gmail.com>
* Adding elinestyle property to errorbar and test case * whitespaces in testcase * Update lib/matplotlib/axes/_axes.py Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> * Update set eb_line_style and fix formatting issues * Remove extra line from test_axes * Break line to reduce width in text_axes.py * Remove trailing whitespaces from axes and test_axes.py * Move elinestyle to the end of the list * Shorten line length in axes.py * accessing the correct property 'linestyle' in eb_line_style * removing unused code * Update lib/matplotlib/axes/_axes.pyi Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com> * pyplot.py unwanted changes reverted * Adding extra blank lines to fix style errors, and removing unnecessary asserts * Updating test_axes.py tp test for dashed lines instead of default * Style fix --------- Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
…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.
…nd then scale them'
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
Throw exception when alpha is out of bounds
Bumps the actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action). Updates `github/codeql-action` from 3.28.18 to 3.28.19 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@ff0a06e...fca7ace) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.28.19 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Co-authored-by: hannah <story645@gmail.com>
Co-authored-by: hannah <story645@gmail.com>
Co-authored-by: hannah <story645@gmail.com>
Co-authored-by: hannah <story645@gmail.com>
Update font-related documentation
TST: Fix runtime error checking NaN input to format_cursor_data
Fixed an off-by-half-pixel bug in image resampling when using a nonaffine transform (e.g., a log axis)
…ctions-694872dfd1 Bump github/codeql-action from 3.28.18 to 3.28.19 in the actions group
Add a filename-prefix option to the Sphinx plot directive
Bumps the actions group with 3 updates: [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel), [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) and [github/codeql-action](https://github.com/github/codeql-action). Updates `pypa/cibuildwheel` from 2.23.3 to 3.0.0 - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](pypa/cibuildwheel@faf86a6...5f22145) Updates `actions/attest-build-provenance` from 2.3.0 to 2.4.0 - [Release notes](https://github.com/actions/attest-build-provenance/releases) - [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md) - [Commits](actions/attest-build-provenance@db473fd...e8998f9) Updates `github/codeql-action` from 3.28.19 to 3.29.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@fca7ace...ce28f5b) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/attest-build-provenance dependency-version: 2.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: github/codeql-action dependency-version: 3.29.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
…ctions-a7d2d3e850 Bump the actions group with 3 updates
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )