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

Commitd9cecc2

Browse files
committed
Maintain data=None in plot()'s explicit signature.
1 parent65576b2 commitd9cecc2

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

‎lib/matplotlib/axes/_axes.py‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
13251325
# Uses a custom implementation of data-kwarg handling in
13261326
# _process_plot_var_args.
13271327
@docstring.dedent_interpd
1328-
defplot(self,*args,scalex=True,scaley=True,**kwargs):
1328+
defplot(self,*args,scalex=True,scaley=True,data=None,**kwargs):
13291329
"""
13301330
Plot y versus x as lines and/or markers.
13311331
@@ -1550,7 +1550,7 @@ def plot(self, *args, scalex=True, scaley=True, **kwargs):
15501550
15511551
"""
15521552
kwargs=cbook.normalize_kwargs(kwargs,mlines.Line2D._alias_map)
1553-
lines= [*self._get_lines(*args,**kwargs)]
1553+
lines= [*self._get_lines(*args,data=data,**kwargs)]
15541554
forlineinlines:
15551555
self.add_line(line)
15561556
self.autoscale_view(scalex=scalex,scaley=scaley)
@@ -1936,7 +1936,7 @@ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none,
19361936
#### Specialized plotting
19371937

19381938
# @_preprocess_data() # let 'plot' do the unpacking..
1939-
defstep(self,x,y,*args,where='pre',**kwargs):
1939+
defstep(self,x,y,*args,where='pre',data=None,**kwargs):
19401940
"""
19411941
Make a step plot.
19421942
@@ -2002,7 +2002,7 @@ def step(self, x, y, *args, where='pre', **kwargs):
20022002
"'pre', 'post' or 'mid'")
20032003
kwargs['linestyle']='steps-'+where+kwargs.get('linestyle','')
20042004

2005-
returnself.plot(x,y,*args,**kwargs)
2005+
returnself.plot(x,y,*args,data=data,**kwargs)
20062006

20072007
@_preprocess_data()
20082008
@docstring.dedent_interpd
@@ -4816,7 +4816,7 @@ def barbs(self, *args, **kw):
48164816

48174817
# Uses a custom implementation of data-kwarg handling in
48184818
# _process_plot_var_args.
4819-
deffill(self,*args,**kwargs):
4819+
deffill(self,*args,data=None,**kwargs):
48204820
"""
48214821
Plot filled polygons.
48224822
@@ -4839,6 +4839,13 @@ def fill(self, *args, **kwargs):
48394839
ax.fill(x, y, x2, y2) # two polygons
48404840
ax.fill(x, y, "b", x2, y2, "r") # a blue and a red polygon
48414841
4842+
data : indexable object, optional
4843+
An object with labelled data. If given, provide the label names to
4844+
plot in *x* and *y*, e.g.::
4845+
4846+
ax.fill("time", "signal",
4847+
data={"time": [0, 1, 2], "signal": [0, 1, 0]})
4848+
48424849
Returns
48434850
-------
48444851
a list of :class:`~matplotlib.patches.Polygon`
@@ -4856,7 +4863,7 @@ def fill(self, *args, **kwargs):
48564863
kwargs=cbook.normalize_kwargs(kwargs,mlines.Line2D._alias_map)
48574864

48584865
patches= []
4859-
forpolyinself._get_patches_for_fill(*args,**kwargs):
4866+
forpolyinself._get_patches_for_fill(*args,data=data,**kwargs):
48604867
self.add_patch(poly)
48614868
patches.append(poly)
48624869
self.autoscale_view()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp