@@ -189,6 +189,12 @@ def _valid_plot_kwargs():
189
189
190
190
'xrotation' : { 'Default' : 45 ,
191
191
'Validator' : lambda value : isinstance (value ,(int ,float )) },
192
+
193
+ 'axesoff' : { 'Default' : False ,
194
+ 'Validator' : lambda value : isinstance (value ,bool ) },
195
+
196
+ 'axesoffdark' : { 'Default' : False ,
197
+ 'Validator' : lambda value : isinstance (value ,bool ) },
192
198
}
193
199
194
200
_validate_vkwargs_dict (vkwargs )
@@ -246,7 +252,6 @@ def plot( data, **kwargs ):
246
252
247
253
fmtstring = _determine_format_string ( dates , config ['datetime_format' ] )
248
254
249
-
250
255
ptype = config ['type' ]
251
256
252
257
if config ['show_nontrading' ]:
@@ -573,12 +578,18 @@ def plot( data, **kwargs ):
573
578
if not used_axC2 and axC2 is not None :
574
579
axC2 .get_yaxis ().set_visible (False )
575
580
576
- if config ['returnfig' ]:
577
- axlist = [axA1 , axA2 ]
578
- if axB1 : axlist .append (axB1 )
579
- if axB2 : axlist .append (axB2 )
580
- if axC1 : axlist .append (axC1 )
581
- if axC2 : axlist .append (axC2 )
581
+ axlist = [axA1 , axA2 ]
582
+ if axB1 : axlist .append (axB1 )
583
+ if axB2 : axlist .append (axB2 )
584
+ if axC1 : axlist .append (axC1 )
585
+ if axC2 : axlist .append (axC2 )
586
+
587
+ if config ['axesoffdark' ]: fig .patch .set_facecolor ('black' )
588
+ if config ['axesoff' ]: fig .patch .set_visible (False )
589
+ if config ['axesoffdark' ] or config ['axesoff' ]:
590
+ for ax in axlist :
591
+ ax .set_xlim (xdates [0 ],xdates [- 1 ])
592
+ ax .set_axis_off ()
582
593
583
594
if config ['savefig' ] is not None :
584
595
save = config ['savefig' ]
0 commit comments