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

Fix DATA_PARAMETER_PLACEHOLDER interpolation for quiver&contour{,f}.#21141

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
timhoffm merged 1 commit intomatplotlib:masterfromanntzer:cqd
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
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
58 changes: 29 additions & 29 deletionslib/matplotlib/axes/_axes.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4966,43 +4966,39 @@ def arrow(self, x, y, dx, dy, **kwargs):
return a

@docstring.copy(mquiver.QuiverKey.__init__)
def quiverkey(self, Q, X, Y, U, label, **kw):
qk = mquiver.QuiverKey(Q, X, Y, U, label, **kw)
def quiverkey(self, Q, X, Y, U, label, **kwargs):
qk = mquiver.QuiverKey(Q, X, Y, U, label, **kwargs)
self.add_artist(qk)
return qk

# Handle units for x and y, if they've been passed
def _quiver_units(self, args,kw):
def _quiver_units(self, args,kwargs):
if len(args) > 3:
x, y = args[0:2]
x, y = self._process_unit_info([("x", x), ("y", y)],kw)
x, y = self._process_unit_info([("x", x), ("y", y)],kwargs)
return (x, y) + args[2:]
return args

# args can by a combination if X, Y, U, V, C and all should be replaced
@_preprocess_data()
def quiver(self, *args, **kw):
@docstring.dedent_interpd
def quiver(self, *args, **kwargs):
"""%(quiver_doc)s"""
# Make sure units are handled for x and y values
args = self._quiver_units(args, kw)

q = mquiver.Quiver(self, *args, **kw)

args = self._quiver_units(args, kwargs)
q = mquiver.Quiver(self, *args, **kwargs)
self.add_collection(q, autolim=True)
self._request_autoscale_view()
return q
quiver.__doc__ = mquiver.Quiver.quiver_doc

# args can be some combination of X, Y, U, V, C and all should be replaced
@_preprocess_data()
@docstring.dedent_interpd
def barbs(self, *args, **kw):
"""
%(barbs_doc)s
"""
def barbs(self, *args, **kwargs):
"""%(barbs_doc)s"""
# Make sure units are handled for x and y values
args = self._quiver_units(args, kw)

b = mquiver.Barbs(self, *args, **kw)
args = self._quiver_units(args, kwargs)
b = mquiver.Barbs(self, *args, **kwargs)
self.add_collection(b, autolim=True)
self._request_autoscale_view()
return b
Expand DownExpand Up@@ -6308,32 +6304,36 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
return ret

@_preprocess_data()
@docstring.dedent_interpd
def contour(self, *args, **kwargs):
kwargs['filled'] = False
contours = mcontour.QuadContourSet(self, *args, **kwargs)
self._request_autoscale_view()
return contours
contour.__doc__ = """
"""
Plot contour lines.

Call signature::

contour([X, Y,] Z, [levels], **kwargs)
""" + mcontour.QuadContourSet._contour_doc

@_preprocess_data()
def contourf(self, *args, **kwargs):
kwargs['filled'] = True
%(contour_doc)s
"""
kwargs['filled'] = False
contours = mcontour.QuadContourSet(self, *args, **kwargs)
self._request_autoscale_view()
return contours
contourf.__doc__ = """

@_preprocess_data()
@docstring.dedent_interpd
def contourf(self, *args, **kwargs):
"""
Plot filled contours.

Call signature::

contourf([X, Y,] Z, [levels], **kwargs)
""" + mcontour.QuadContourSet._contour_doc
%(contour_doc)s
"""
kwargs['filled'] = True
contours = mcontour.QuadContourSet(self, *args, **kwargs)
self._request_autoscale_view()
return contours

def clabel(self, CS, levels=None, **kwargs):
"""
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp