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

New data → color pipeline#28658

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
tacaswell merged 18 commits intomatplotlib:mainfromtrygvrad:Colorizer-class
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
18 commits
Select commitHold shift + click to select a range
1e52ba8
Colorizer class
trygvradAug 2, 2024
9e5620d
Creation of colorizer.py
trygvradAug 6, 2024
b3f5260
updated ColorizingArtist.__init__
trygvradAug 7, 2024
edbe127
simplify to_rgba() by extracting the part relating to RGBA data
trygvradAug 9, 2024
fc9973e
updated class hierarchy for Colorizer
trygvradAug 13, 2024
596daec
colorizer keyword on plotting functions with typing
trygvradAug 13, 2024
21a5a64
changes to keyword parameter ordering
trygvradAug 16, 2024
5755d1b
adjustments based on code review
trygvradAug 21, 2024
a6fe9e8
MNT: adjust inheritance so isinstance(..., cm.ScalarMappable) works
tacaswellAug 21, 2024
dbe8cc3
updated docs with colorizer changes
trygvradAug 21, 2024
9ac2739
updates to colorizer pipeline based on feedback from @QuLogic
trygvradAug 27, 2024
7dd31ad
DOC: fix unrelated xref issues
tacaswellAug 29, 2024
1ecfe95
DOC: add multivariate colormaps to the docs
tacaswellAug 29, 2024
c685f36
DOC: fix colorizer related xrefs
tacaswellAug 29, 2024
676a31f
DOC: auto-generate ScalarMappable in conf.py
tacaswellAug 29, 2024
c3cad60
Corrections based on feedback from @QuLogic
trygvradSep 6, 2024
269ace9
MNT: Touch up rebase to use 'register' for docstring interpolations
ksundenOct 11, 2024
336a9ba
fix missing refererence linenos
ksundenOct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionsdoc/api/.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
scalarmappable.gen_rst
2 changes: 2 additions & 0 deletionsdoc/api/cm_api.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,3 +6,5 @@
:members:
:undoc-members:
:show-inheritance:

..include::scalarmappable.gen_rst
9 changes: 9 additions & 0 deletionsdoc/api/colorizer_api.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
************************
``matplotlib.colorizer``
************************

.. automodule:: matplotlib.colorizer
:members:
:undoc-members:
:show-inheritance:
:private-members: _ColorizerInterface, _ScalarMappable
15 changes: 13 additions & 2 deletionsdoc/api/colors_api.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,8 +32,8 @@ Color norms
SymLogNorm
TwoSlopeNorm

Colormaps
---------
UnivariateColormaps
--------------------

.. autosummary::
:toctree: _as_gen/
Expand All@@ -43,6 +43,17 @@ Colormaps
LinearSegmentedColormap
ListedColormap

Multivariate Colormaps
----------------------

.. autosummary::
:toctree: _as_gen/
:template: autosummary.rst

BivarColormap
SegmentedBivarColormap
BivarColormapFromImage

Other classes
-------------

Expand Down
1 change: 1 addition & 0 deletionsdoc/api/index.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -93,6 +93,7 @@ Alphabetical list of modules:
cm_api.rst
collections_api.rst
colorbar_api.rst
colorizer_api.rst
colors_api.rst
container_api.rst
contour_api.rst
Expand Down
54 changes: 53 additions & 1 deletiondoc/conf.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,6 @@

import matplotlib


# debug that building expected version
print(f"Building Documentation for Matplotlib: {matplotlib.__version__}")

Expand DownExpand Up@@ -852,6 +851,58 @@ def linkcode_resolve(domain, info):
extensions.append('sphinx.ext.viewcode')


def generate_ScalarMappable_docs():

import matplotlib.colorizer
from numpydoc.docscrape_sphinx import get_doc_object
from pathlib import Path
import textwrap
from sphinx.util.inspect import stringify_signature
target_file = Path(__file__).parent / 'api' / 'scalarmappable.gen_rst'
with open(target_file, 'w') as fout:
fout.write("""
.. class:: ScalarMappable(colorizer, **kwargs)
:canonical: matplotlib.colorizer._ScalarMappable

""")
for meth in [
matplotlib.colorizer._ScalarMappable.autoscale,
matplotlib.colorizer._ScalarMappable.autoscale_None,
matplotlib.colorizer._ScalarMappable.changed,
"""
.. attribute:: colorbar

The last colorbar associated with this ScalarMappable. May be None.
""",
matplotlib.colorizer._ScalarMappable.get_alpha,
matplotlib.colorizer._ScalarMappable.get_array,
matplotlib.colorizer._ScalarMappable.get_clim,
matplotlib.colorizer._ScalarMappable.get_cmap,
"""
.. property:: norm
""",
matplotlib.colorizer._ScalarMappable.set_array,
matplotlib.colorizer._ScalarMappable.set_clim,
matplotlib.colorizer._ScalarMappable.set_cmap,
matplotlib.colorizer._ScalarMappable.set_norm,
matplotlib.colorizer._ScalarMappable.to_rgba,
]:
if isinstance(meth, str):
fout.write(meth)
else:
name = meth.__name__
sig = stringify_signature(inspect.signature(meth))
docstring = textwrap.indent(
str(get_doc_object(meth)),
' '
).rstrip()
fout.write(f"""
.. method:: {name}{sig}
{docstring}

""")


# -----------------------------------------------------------------------------
# Sphinx setup
# -----------------------------------------------------------------------------
Expand All@@ -865,3 +916,4 @@ def setup(app):
app.connect('autodoc-process-bases', autodoc_process_bases)
if sphinx.version_info[:2] < (7, 1):
app.connect('html-page-context', add_html_cache_busting, priority=1000)
generate_ScalarMappable_docs()
18 changes: 6 additions & 12 deletionsdoc/missing-references.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -306,8 +306,8 @@
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.broken_barh:84",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.fill_between:121",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.fill_betweenx:121",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.hexbin:213",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.pcolor:182",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.hexbin:217",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.pcolor:186",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.quiver:215",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.AsteriskPolygonCollection.set:44",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.CircleCollection.set:44",
Expand All@@ -321,8 +321,8 @@
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.broken_barh:84",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.fill_between:121",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.fill_betweenx:121",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hexbin:213",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.pcolor:182",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hexbin:217",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.pcolor:186",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.quiver:215",
"lib/matplotlib/quiver.py:docstring of matplotlib.artist.Barbs.set:45",
"lib/matplotlib/quiver.py:docstring of matplotlib.artist.Quiver.set:45",
Expand All@@ -332,10 +332,10 @@
"lib/mpl_toolkits/mplot3d/art3d.py:docstring of matplotlib.artist.Poly3DCollection.set:45"
],
"matplotlib.collections._MeshData.set_array": [
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.pcolormesh:164",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.pcolormesh:168",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.PolyQuadMesh.set:17",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.QuadMesh.set:17",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.pcolormesh:164"
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.pcolormesh:168"
]
},
"py:obj": {
Expand All@@ -355,12 +355,6 @@
"Line2D.pick": [
"doc/users/explain/figure/event_handling.rst:571"
],
"QuadContourSet.changed()": [
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.contour:156",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.contourf:156",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.contour:156",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.contourf:156"
],
"Rectangle.contains": [
"doc/users/explain/figure/event_handling.rst:285"
],
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp