@@ -260,7 +260,7 @@ def _valid_plot_kwargs():
260
260
'Validator' : lambda value : _hlines_validator (value ) },
261
261
262
262
'vlines' : { 'Default' : None ,
263
- 'Description' : 'Draw one or more VERTICAL LINES across entire plot, by' +
263
+ 'Description' : 'Draw VERTICAL LINES across one plot, by' +
264
264
' specifying a date[time], or sequence of date[time]. May also' +
265
265
' be a dict with key `vlines` specifying a date[time] or sequence' +
266
266
' of date[time], plus one or more of the following keys:' +
@@ -532,7 +532,7 @@ def plot( data, **kwargs ):
532
532
if ptype == 'line' :
533
533
lw = config ['_width_config' ]['line_width' ]
534
534
pmarkevery = config ['markevery' ]
535
- axA1 .plot (xdates , closes , 'o' , markevery = pmarkevery , ls = '-' , color = config ['linecolor' ], linewidth = lw , )
535
+ axA1 .plot (xdates , closes , 'o' , markevery = pmarkevery , ls = '-' , color = config ['linecolor' ], linewidth = lw )
536
536
else :
537
537
collections = _construct_mpf_collections (ptype ,dates ,xdates ,opens ,highs ,lows ,closes ,volumes ,config ,style )
538
538
if ptype in VALID_PMOVE_TYPES :
@@ -656,31 +656,28 @@ def plot( data, **kwargs ):
656
656
tlines = [tlines ,]
657
657
for tline_item in tlines :
658
658
line_collections .append (_construct_tline_collections (tline_item , dtix , dates , opens , highs , lows , closes ))
659
- ### note
660
- # if config['addplot'] is not None:
661
- # for panid,row in panels.iterrows():
662
- # print(panid)
663
- # print("the value of min and max is ",miny,maxy)
664
- # print("type of row is ", type(row))
665
- # print("panid is ",panid)
666
- # print("row key is ",row.keys())
667
- # ax = row['axes']
668
- # line_collections = []
669
- # if (panid == 0):
670
- # line_collections.append(_construct_vline_collections(config['vlines'], dtix, miny, maxy))
671
- # else:
672
- # line_collections.append(_construct_vline_collections(config['vlines'], dtix, 200, 600))
673
-
674
- # for collection in line_collections:
675
- # if collection is not None:
676
- # ax[0].add_collection(collection)
677
- if config ['addplot' ] is not None :
659
+
660
+ vlinelist = config ['vlines' ]
661
+
662
+ if config ['addplot' ] is not None and vlinelist is not None :
678
663
for panid ,row in panels .iterrows ():
679
664
ax = row ['axes' ]
680
- print (dtix )
681
- print (config ['vlines' ])
682
- # _date_to_iloc
683
- ax [0 ].axvline (x = 50.5 ,linestyle = '--' )
665
+
666
+ # print("the type of vlinelist is ",type(vlinelist))
667
+
668
+ # print(vlinelist)
669
+ # print(vlinelist['vlines'])
670
+
671
+ # for line in vlinelist['vlines']:
672
+ # print("the line is ",line)
673
+ # print("the line is type ",type(line))
674
+
675
+ # print("the data type is ",type(data))
676
+ # print("the data type is ",data.columns)
677
+ # ax[0].axvline(x=data.loc[str(line)],linestyle='--')
678
+ ax [0 ].axvline (x = 50 ,linestyle = '--' )
679
+
680
+
684
681
else :
685
682
for collection in line_collections :
686
683
if collection is not None :
0 commit comments