@@ -707,13 +707,6 @@ def plot( data, **kwargs ):
707707 elif panid == 'lower' : panid = 1 # for backwards compatibility
708708 if apdict ['y_on_right' ] is not None :
709709 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 )
717710 aptype = apdict ['type' ]
718711 if aptype == 'ohlc' or aptype == 'candle' :
719712 ax = _addplot_collections (panid ,panels ,apdict ,xdates ,config )
@@ -1082,8 +1075,11 @@ def _addplot_columns(panid,panels,ydata,apdict,xdates,config):
10821075def _addplot_apply_supplements (ax ,apdict ,xdates ):
10831076 if (apdict ['ylabel' ] is not None ):
10841077 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.
10871083 if apdict ['ylim' ] is not None :
10881084 ax .set_ylim (apdict ['ylim' ][0 ],apdict ['ylim' ][1 ])
10891085 if apdict ['title' ] is not None :
@@ -1257,10 +1253,6 @@ def _valid_addplot_kwargs():
12571253 'Description' : 'label for y-axis (for this addplot)' ,
12581254 'Validator' : lambda value : isinstance (value ,str ) },
12591255
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-
12641256 'ylim' : {'Default' : None ,
12651257 'Description' : 'Limits for addplot y-axis as tuple (min,max), i.e. (bottom,top)' ,
12661258 'Validator' : lambda value : isinstance (value , (list ,tuple )) and len (value ) == 2
0 commit comments