@@ -2980,7 +2980,7 @@ def pie(self, x, explode=None, labels=None, colors=None,
29802980 autopct = None , pctdistance = 0.6 , shadow = False , labeldistance = 1.1 ,
29812981 startangle = 0 , radius = 1 , counterclock = True ,
29822982 wedgeprops = None , textprops = None , center = (0 , 0 ),
2983- frame = False , rotatelabels = False , * , normalize = None ):
2983+ frame = False , rotatelabels = False , * , normalize = True ):
29842984 """
29852985 Plot a pie chart.
29862986
@@ -3021,19 +3021,11 @@ def pie(self, x, explode=None, labels=None, colors=None,
30213021 shadow : bool, default: False
30223022 Draw a shadow beneath the pie.
30233023
3024- normalize : None or bool, default: None
3024+ normalize : bool, default: True
30253025 When *True*, always make a full pie by normalizing x so that
30263026 ``sum(x) == 1``. *False* makes a partial pie if ``sum(x) <= 1``
30273027 and raises a `ValueError` for ``sum(x) > 1``.
30283028
3029- When *None*, defaults to *True* if ``sum(x) >= 1`` and *False* if
3030- ``sum(x) < 1``.
3031-
3032- Please note that the previous default value of *None* is now
3033- deprecated, and the default will change to *True* in the next
3034- release. Please pass ``normalize=False`` explicitly if you want to
3035- draw a partial pie.
3036-
30373029 labeldistance : float or None, default: 1.1
30383030 The radial distance at which the pie labels are drawn.
30393031 If set to ``None``, label are not drawn, but are stored for use in
@@ -3102,17 +3094,6 @@ def pie(self, x, explode=None, labels=None, colors=None,
31023094
31033095 sx = x .sum ()
31043096
3105- if normalize is None :
3106- if sx < 1 :
3107- _api .warn_deprecated (
3108- "3.3" , message = "normalize=None does not normalize "
3109- "if the sum is less than 1 but this behavior "
3110- "is deprecated since %(since)s until %(removal)s. "
3111- "After the deprecation "
3112- "period the default value will be normalize=True. "
3113- "To prevent normalization pass normalize=False " )
3114- else :
3115- normalize = True
31163097 if normalize :
31173098 x = x / sx
31183099 elif sx > 1 :
@@ -3133,20 +3114,11 @@ def pie(self, x, explode=None, labels=None, colors=None,
31333114 def get_next_color ():
31343115 return next (color_cycle )
31353116
3136- if radius is None :
3137- _api .warn_deprecated (
3138- "3.3" , message = "Support for passing a radius of None to mean "
3139- "1 is deprecated since %(since)s and will be removed "
3140- "%(removal)s." )
3141- radius = 1
3117+ _api .check_isinstance (Number , radius = radius , startangle = startangle )
3118+ if radius <= 0 :
3119+ raise ValueError (f'radius must be a positive number, not { radius } ' )
31423120
31433121 # Starting theta1 is the start fraction of the circle
3144- if startangle is None :
3145- _api .warn_deprecated (
3146- "3.3" , message = "Support for passing a startangle of None to "
3147- "mean 0 is deprecated since %(since)s and will be removed "
3148- "%(removal)s." )
3149- startangle = 0
31503122 theta1 = startangle / 360
31513123
31523124 if wedgeprops is None :
0 commit comments