@@ -707,13 +707,6 @@ def plot( data, **kwargs ):
707
707
elif panid == 'lower' : panid = 1 # for backwards compatibility
708
708
if apdict ['y_on_right' ] is not None :
709
709
panels .at [panid ,'y_on_right' ] = apdict ['y_on_right' ]
710
- if apdict ['xlabel' ] is not None :
711
- apdict ['xlabel' ] = None # set to None so `_addplot_apply_supplements()` won't apply it.
712
- warnings .warn ('\n \n ================================================================= ' +
713
- '\n \n WARNING: make_addplot `xlabel` IGNORED in Panels mode.' +
714
- '\n Use `mpf.plot(...,xlabel=)` instead.' +
715
- '\n \n ================================================================ ' ,
716
- category = UserWarning )
717
710
aptype = apdict ['type' ]
718
711
if aptype == 'ohlc' or aptype == 'candle' :
719
712
ax = _addplot_collections (panid ,panels ,apdict ,xdates ,config )
@@ -1082,8 +1075,11 @@ def _addplot_columns(panid,panels,ydata,apdict,xdates,config):
1082
1075
def _addplot_apply_supplements (ax ,apdict ,xdates ):
1083
1076
if (apdict ['ylabel' ] is not None ):
1084
1077
ax .set_ylabel (apdict ['ylabel' ])
1085
- if (apdict ['xlabel' ] is not None ):
1086
- ax .set_xlabel (apdict ['xlabel' ])
1078
+ # Note that xlabel is NOT supported for addplot. This is because
1079
+ # in Panels Mode, there is only one xlabel (on the bottom axes)
1080
+ # which is handled by the `xlabel` kwarg of `mpf.plot()`,
1081
+ # whereas in External Axes Mode, users can call `Axes.set_xlabel()` on
1082
+ # the axes object of their choice.
1087
1083
if apdict ['ylim' ] is not None :
1088
1084
ax .set_ylim (apdict ['ylim' ][0 ],apdict ['ylim' ][1 ])
1089
1085
if apdict ['title' ] is not None :
@@ -1257,10 +1253,6 @@ def _valid_addplot_kwargs():
1257
1253
'Description' : 'label for y-axis (for this addplot)' ,
1258
1254
'Validator' : lambda value : isinstance (value ,str ) },
1259
1255
1260
- 'xlabel' : { 'Default' : None , # x-axis label
1261
- 'Description' : 'x-axis label (for addplot ONLY when in external axes mode)' ,
1262
- 'Validator' : lambda value : isinstance (value ,str ) },
1263
-
1264
1256
'ylim' : {'Default' : None ,
1265
1257
'Description' : 'Limits for addplot y-axis as tuple (min,max), i.e. (bottom,top)' ,
1266
1258
'Validator' : lambda value : isinstance (value , (list ,tuple )) and len (value ) == 2
0 commit comments