@@ -139,25 +139,6 @@ def _process_plot_format(fmt):
139
139
return linestyle , marker , color
140
140
141
141
142
- def set_default_color_cycle (clist ):
143
- """
144
- Change the default cycle of colors that will be used by the plot
145
- command. This must be called before creating the
146
- :class:`Axes` to which it will apply; it will
147
- apply to all future axes.
148
-
149
- *clist* is a sequence of mpl color specifiers.
150
-
151
- See also: :meth:`~matplotlib.axes.Axes.set_color_cycle`.
152
-
153
- .. Note:: Deprecated 2010/01/03.
154
- Set rcParams['axes.color_cycle'] directly.
155
-
156
- """
157
- rcParams ['axes.color_cycle' ] = clist
158
- warnings .warn ("Set rcParams['axes.color_cycle'] directly" , mplDeprecation )
159
-
160
-
161
142
class _process_plot_var_args (object ):
162
143
"""
163
144
Process variable length arguments to the plot command, so that
@@ -282,12 +263,11 @@ def _makefill(self, x, y, kw, kwargs):
282
263
facecolor = kw ['color' ]
283
264
except KeyError :
284
265
facecolor = self .color_cycle .next ()
285
- seg = mpatches .Polygon (np .hstack (
286
- (x [:, np .newaxis ], y [:, np .newaxis ])),
287
- facecolor = facecolor ,
288
- fill = True ,
289
- closed = kw ['closed' ]
290
- )
266
+ seg = mpatches .Polygon (np .hstack ((x [:, np .newaxis ],
267
+ y [:, np .newaxis ])),
268
+ facecolor = facecolor ,
269
+ fill = True ,
270
+ closed = kw ['closed' ])
291
271
self .set_patchprops (seg , ** kwargs )
292
272
return seg
293
273
@@ -586,9 +566,9 @@ def _set_lim_and_transforms(self):
586
566
self .transData = self .transScale + (self .transLimits + self .transAxes )
587
567
588
568
self ._xaxis_transform = mtransforms .blended_transform_factory (
589
- self .transData , self .transAxes )
569
+ self .transData , self .transAxes )
590
570
self ._yaxis_transform = mtransforms .blended_transform_factory (
591
- self .transAxes , self .transData )
571
+ self .transAxes , self .transData )
592
572
593
573
def get_xaxis_transform (self , which = 'grid' ):
594
574
"""
@@ -1067,11 +1047,16 @@ def set_aspect(self, aspect, adjustable=None, anchor=None):
1067
1047
etc.
1068
1048
===== =====================
1069
1049
1050
+ .. deprecated:: 1.2
1051
+ the option 'normal' for aspect is deprecated. Use 'auto' instead.
1070
1052
"""
1071
- if aspect in ('normal' , 'auto' ):
1053
+ if aspect == 'normal' :
1054
+ warnings .warn ("Use 'auto' instead of 'normal' for aspect. Will "
1055
+ "be removed in 1.4.x" , mplDeprecation )
1072
1056
self ._aspect = 'auto'
1073
- elif aspect == 'equal' :
1074
- self ._aspect = 'equal'
1057
+
1058
+ elif aspect in ('equal' , 'auto' ):
1059
+ self ._aspect = aspect
1075
1060
else :
1076
1061
self ._aspect = float (aspect ) # raise ValueError if necessary
1077
1062
@@ -1370,14 +1355,6 @@ def axis(self, *v, **kwargs):
1370
1355
1371
1356
return v
1372
1357
1373
- def get_child_artists (self ):
1374
- """
1375
- Return a list of artists the axes contains.
1376
-
1377
- .. deprecated:: 0.98
1378
- """
1379
- raise mplDeprecation ('Use get_children instead' )
1380
-
1381
1358
def get_frame (self ):
1382
1359
"""Return the axes Rectangle frame"""
1383
1360
warnings .warn ('use ax.patch instead' , mplDeprecation )
@@ -3108,30 +3085,6 @@ def set_cursor_props(self, *args):
3108
3085
c = mcolors .colorConverter .to_rgba (c )
3109
3086
self ._cursorProps = lw , c
3110
3087
3111
- def connect (self , s , func ):
3112
- """
3113
- Register observers to be notified when certain events occur. Register
3114
- with callback functions with the following signatures. The function
3115
- has the following signature::
3116
-
3117
- func(ax) # where ax is the instance making the callback.
3118
-
3119
- The following events can be connected to:
3120
-
3121
- 'xlim_changed','ylim_changed'
3122
-
3123
- The connection id is is returned - you can use this with
3124
- disconnect to disconnect from the axes event
3125
-
3126
- """
3127
- raise mplDeprecation ('use the callbacks CallbackRegistry instance '
3128
- 'instead' )
3129
-
3130
- def disconnect (self , cid ):
3131
- """disconnect from the Axes event."""
3132
- raise mplDeprecation ('use the callbacks CallbackRegistry instance '
3133
- 'instead' )
3134
-
3135
3088
def get_children (self ):
3136
3089
"""return a list of child artists"""
3137
3090
children = []
@@ -3180,9 +3133,6 @@ def pick(self, *args):
3180
3133
each child artist will fire a pick event if mouseevent is over
3181
3134
the artist and the artist has picker set
3182
3135
"""
3183
- if len (args ) > 1 :
3184
- raise mplDeprecation ('New pick API implemented -- '
3185
- 'see API_CHANGES in the src distribution' )
3186
3136
martist .Artist .pick (self , args [0 ])
3187
3137
3188
3138
### Labelling
@@ -3679,10 +3629,6 @@ def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
3679
3629
3680
3630
.. plot:: mpl_examples/pylab_examples/hline_demo.py
3681
3631
"""
3682
- if kwargs .get ('fmt' ) is not None :
3683
- raise mplDeprecation ('hlines now uses a '
3684
- 'collections.LineCollection and not a '
3685
- 'list of Line2D to draw; see API_CHANGES' )
3686
3632
3687
3633
# We do the conversion first since not all unitized data is uniform
3688
3634
# process the unit information
@@ -3761,11 +3707,6 @@ def vlines(self, x, ymin, ymax, colors='k', linestyles='solid',
3761
3707
%(LineCollection)s
3762
3708
"""
3763
3709
3764
- if kwargs .get ('fmt' ) is not None :
3765
- raise mplDeprecation ('vlines now uses a '
3766
- 'collections.LineCollection and not a '
3767
- 'list of Line2D to draw; see API_CHANGES' )
3768
-
3769
3710
self ._process_unit_info (xdata = x , ydata = [ymin , ymax ], kwargs = kwargs )
3770
3711
3771
3712
# We do the conversion first since not all unitized data is uniform
@@ -4476,7 +4417,8 @@ def legend(self, *args, **kwargs):
4476
4417
instance. If *prop* is a dictionary, a new instance will be
4477
4418
created with *prop*. If *None*, use rc settings.
4478
4419
4479
- *fontsize*: [ size in points | 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' ]
4420
+ *fontsize*: [size in points | 'xx-small' | 'x-small' | 'small' |
4421
+ 'medium' | 'large' | 'x-large' | 'xx-large']
4480
4422
Set the font size. May be either a size string, relative to
4481
4423
the default font size, or an absolute font size in points. This
4482
4424
argument is only used if prop is not specified.
@@ -5498,7 +5440,6 @@ def xywhere(xs, ys, mask):
5498
5440
if 'zorder' in kwargs :
5499
5441
plot_kw ['zorder' ] = kwargs ['zorder' ]
5500
5442
5501
-
5502
5443
if xerr is not None :
5503
5444
if (iterable (xerr ) and len (xerr ) == 2 and
5504
5445
iterable (xerr [0 ]) and iterable (xerr [1 ])):
@@ -5970,9 +5911,8 @@ def dopatch(xs, ys):
5970
5911
5971
5912
@docstring .dedent_interpd
5972
5913
def scatter (self , x , y , s = 20 , c = 'b' , marker = 'o' , cmap = None , norm = None ,
5973
- vmin = None , vmax = None , alpha = None , linewidths = None ,
5974
- faceted = True , verts = None ,
5975
- ** kwargs ):
5914
+ vmin = None , vmax = None , alpha = None , linewidths = None ,
5915
+ verts = None , ** kwargs ):
5976
5916
"""
5977
5917
Make a scatter plot.
5978
5918
@@ -6095,13 +6035,16 @@ def scatter(self, x, y, s=20, c='b', marker='o', cmap=None, norm=None,
6095
6035
else :
6096
6036
colors = mcolors .colorConverter .to_rgba_array (c , alpha )
6097
6037
6098
- if faceted :
6099
- edgecolors = None
6100
- else :
6101
- edgecolors = 'none'
6102
- warnings .warn (
6103
- '''replace "faceted=False" with "edgecolors='none'"''' ,
6104
- mplDeprecation ) # 2008/04/18
6038
+ faceted = kwargs .pop ('faceted' , None )
6039
+ edgecolors = kwargs .get ('edgecolors' , None )
6040
+ if faceted is not None :
6041
+ warnings .warn ("The faceted option is deprecated. "
6042
+ "Please use edgecolor instead. Will "
6043
+ "be remove in 1.4" , mplDeprecation )
6044
+ if faceted :
6045
+ edgecolors = None
6046
+ else :
6047
+ edgecolors = 'none'
6105
6048
6106
6049
# to be API compatible
6107
6050
if marker is None and not (verts is None ):
@@ -6615,9 +6558,10 @@ def arrow(self, x, y, dx, dy, **kwargs):
6615
6558
Draws arrow on specified axis from (*x*, *y*) to (*x* + *dx*,
6616
6559
*y* + *dy*). Uses FancyArrow patch to construct the arrow.
6617
6560
6618
- The resulting arrow is affected by the axes aspect ratio and limits. This
6619
- may produce an arrow whose head is not square with its stem. To create
6620
- an arrow whose head is square with its stem, use :meth:`annotate`.
6561
+ The resulting arrow is affected by the axes aspect ratio and limits.
6562
+ This may produce an arrow whose head is not square with its stem. To
6563
+ create an arrow whose head is square with its stem, use
6564
+ :meth:`annotate`.
6621
6565
6622
6566
Optional kwargs control the arrow construction and properties:
6623
6567
@@ -7319,6 +7263,9 @@ def pcolor(self, *args, **kwargs):
7319
7263
cmap = kwargs .pop ('cmap' , None )
7320
7264
vmin = kwargs .pop ('vmin' , None )
7321
7265
vmax = kwargs .pop ('vmax' , None )
7266
+ if 'shading' in kwargs :
7267
+ warnings .warn ("Use edgecolors instead of shading. "
7268
+ "Will be removed in 1.4" , mplDeprecation )
7322
7269
shading = kwargs .pop ('shading' , 'flat' )
7323
7270
7324
7271
X , Y , C = self ._pcolorargs ('pcolor' , * args )
@@ -7367,6 +7314,7 @@ def pcolor(self, *args, **kwargs):
7367
7314
edgecolors = 'k' ,
7368
7315
else :
7369
7316
edgecolors = 'none'
7317
+
7370
7318
if 'edgecolor' in kwargs :
7371
7319
kwargs ['edgecolors' ] = kwargs .pop ('edgecolor' )
7372
7320
ec = kwargs .setdefault ('edgecolors' , edgecolors )
@@ -7893,8 +7841,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
7893
7841
Either an integer number of bins or a sequence giving the
7894
7842
bins. If *bins* is an integer, *bins* + 1 bin edges
7895
7843
will be returned, consistent with :func:`numpy.histogram`
7896
- for numpy version >= 1.3, and with the *new* = True argument
7897
- in earlier versions.
7844
+ for numpy version >= 1.3.
7898
7845
Unequally spaced bins are supported if *bins* is a sequence.
7899
7846
7900
7847
*range*:
@@ -8035,11 +7982,6 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
8035
7982
raise ValueError (
8036
7983
"orientation kwarg %s is not recognized" % orientation )
8037
7984
8038
- if kwargs .get ('width' ) is not None :
8039
- raise mplDeprecation (
8040
- 'hist now uses the rwidth to give relative width '
8041
- 'and not absolute width' )
8042
-
8043
7985
if histtype == 'barstacked' and not stacked :
8044
7986
stacked = True
8045
7987
@@ -8124,8 +8066,6 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
8124
8066
# We will handle the normed kwarg within mpl until we
8125
8067
# get to the point of requiring numpy >= 1.5.
8126
8068
hist_kwargs = dict (range = bin_range )
8127
- if np .__version__ < "1.3" : # version 1.1 and 1.2
8128
- hist_kwargs ['new' ] = True
8129
8069
8130
8070
n = []
8131
8071
mlast = bottom
@@ -8185,6 +8125,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
8185
8125
8186
8126
if align == 'mid' or align == 'edge' :
8187
8127
boffset += 0.5 * totwidth
8128
+
8188
8129
elif align == 'right' :
8189
8130
boffset += totwidth
8190
8131
@@ -8767,10 +8708,6 @@ def spy(self, Z, precision=0, marker=None, markersize=None,
8767
8708
:func:`~matplotlib.pyplot.plot`
8768
8709
For plotting options
8769
8710
"""
8770
- if precision is None :
8771
- precision = 0
8772
- warnings .warn ("Use precision=0 instead of None" , mplDeprecation )
8773
- # 2008/10/03
8774
8711
if marker is None and markersize is None and hasattr (Z , 'tocoo' ):
8775
8712
marker = 's'
8776
8713
if marker is None and markersize is None :
0 commit comments