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

Commiteca6a83

Browse files
authored
Merge pull request#21141 from anntzer/cqd
Fix DATA_PARAMETER_PLACEHOLDER interpolation for quiver&contour{,f}.
2 parents0636a04 +609b9fa commiteca6a83

File tree

4 files changed

+245
-240
lines changed

4 files changed

+245
-240
lines changed

‎lib/matplotlib/axes/_axes.py‎

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4966,43 +4966,39 @@ def arrow(self, x, y, dx, dy, **kwargs):
49664966
returna
49674967

49684968
@docstring.copy(mquiver.QuiverKey.__init__)
4969-
defquiverkey(self,Q,X,Y,U,label,**kw):
4970-
qk=mquiver.QuiverKey(Q,X,Y,U,label,**kw)
4969+
defquiverkey(self,Q,X,Y,U,label,**kwargs):
4970+
qk=mquiver.QuiverKey(Q,X,Y,U,label,**kwargs)
49714971
self.add_artist(qk)
49724972
returnqk
49734973

49744974
# Handle units for x and y, if they've been passed
4975-
def_quiver_units(self,args,kw):
4975+
def_quiver_units(self,args,kwargs):
49764976
iflen(args)>3:
49774977
x,y=args[0:2]
4978-
x,y=self._process_unit_info([("x",x), ("y",y)],kw)
4978+
x,y=self._process_unit_info([("x",x), ("y",y)],kwargs)
49794979
return (x,y)+args[2:]
49804980
returnargs
49814981

49824982
# args can by a combination if X, Y, U, V, C and all should be replaced
49834983
@_preprocess_data()
4984-
defquiver(self,*args,**kw):
4984+
@docstring.dedent_interpd
4985+
defquiver(self,*args,**kwargs):
4986+
"""%(quiver_doc)s"""
49854987
# Make sure units are handled for x and y values
4986-
args=self._quiver_units(args,kw)
4987-
4988-
q=mquiver.Quiver(self,*args,**kw)
4989-
4988+
args=self._quiver_units(args,kwargs)
4989+
q=mquiver.Quiver(self,*args,**kwargs)
49904990
self.add_collection(q,autolim=True)
49914991
self._request_autoscale_view()
49924992
returnq
4993-
quiver.__doc__=mquiver.Quiver.quiver_doc
49944993

49954994
# args can be some combination of X, Y, U, V, C and all should be replaced
49964995
@_preprocess_data()
49974996
@docstring.dedent_interpd
4998-
defbarbs(self,*args,**kw):
4999-
"""
5000-
%(barbs_doc)s
5001-
"""
4997+
defbarbs(self,*args,**kwargs):
4998+
"""%(barbs_doc)s"""
50024999
# Make sure units are handled for x and y values
5003-
args=self._quiver_units(args,kw)
5004-
5005-
b=mquiver.Barbs(self,*args,**kw)
5000+
args=self._quiver_units(args,kwargs)
5001+
b=mquiver.Barbs(self,*args,**kwargs)
50065002
self.add_collection(b,autolim=True)
50075003
self._request_autoscale_view()
50085004
returnb
@@ -6300,32 +6296,36 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
63006296
returnret
63016297

63026298
@_preprocess_data()
6299+
@docstring.dedent_interpd
63036300
defcontour(self,*args,**kwargs):
6304-
kwargs['filled']=False
6305-
contours=mcontour.QuadContourSet(self,*args,**kwargs)
6306-
self._request_autoscale_view()
6307-
returncontours
6308-
contour.__doc__="""
6301+
"""
63096302
Plot contour lines.
63106303
63116304
Call signature::
63126305
63136306
contour([X, Y,] Z, [levels], **kwargs)
6314-
"""+mcontour.QuadContourSet._contour_doc
6315-
6316-
@_preprocess_data()
6317-
defcontourf(self,*args,**kwargs):
6318-
kwargs['filled']=True
6307+
%(contour_doc)s
6308+
"""
6309+
kwargs['filled']=False
63196310
contours=mcontour.QuadContourSet(self,*args,**kwargs)
63206311
self._request_autoscale_view()
63216312
returncontours
6322-
contourf.__doc__="""
6313+
6314+
@_preprocess_data()
6315+
@docstring.dedent_interpd
6316+
defcontourf(self,*args,**kwargs):
6317+
"""
63236318
Plot filled contours.
63246319
63256320
Call signature::
63266321
63276322
contourf([X, Y,] Z, [levels], **kwargs)
6328-
"""+mcontour.QuadContourSet._contour_doc
6323+
%(contour_doc)s
6324+
"""
6325+
kwargs['filled']=True
6326+
contours=mcontour.QuadContourSet(self,*args,**kwargs)
6327+
self._request_autoscale_view()
6328+
returncontours
63296329

63306330
defclabel(self,CS,levels=None,**kwargs):
63316331
"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp