@@ -144,7 +144,7 @@ def _group_trades(column):
144144 def f (s , new_index = pd .Index (df .index .view (int )), bars = trades [column ]):
145145 if s .size :
146146 # Via int64 because on pandas recently broken datetime
147- mean_time = int (bars .loc [s .index ].view (int ).mean ())
147+ mean_time = int (bars .loc [s .index ].astype (int ).mean ())
148148 new_bar_idx = new_index .get_indexer ([mean_time ], method = 'nearest' )[0 ]
149149 return new_bar_idx
150150 return f
@@ -440,11 +440,11 @@ def _plot_superimposed_ohlc():
440440 """Superimposed, downsampled vbars"""
441441 time_resolution = pd .DatetimeIndex (df ['datetime' ]).resolution
442442 resample_rule = (superimpose if isinstance (superimpose , str ) else
443- dict (day = 'M ' ,
443+ dict (day = 'ME ' ,
444444 hour = 'D' ,
445- minute = 'H ' ,
446- second = 'T ' ,
447- millisecond = 'S ' ).get (time_resolution ))
445+ minute = 'h ' ,
446+ second = 'min ' ,
447+ millisecond = 's ' ).get (time_resolution ))
448448 if not resample_rule :
449449 warnings .warn (
450450 f"'Can't superimpose OHLC data with rule '{ resample_rule } '"
@@ -548,22 +548,22 @@ def __eq__(self, other):
548548 if is_overlay :
549549 ohlc_extreme_values [source_name ] = arr
550550 if is_scatter :
551- fig .scatter (
551+ fig .circle (
552552 'index' , source_name , source = source ,
553553 legend_label = legend_label , color = color ,
554554 line_color = 'black' , fill_alpha = .8 ,
555- marker = 'circle' , radius = BAR_WIDTH / 2 * 1.5 )
555+ radius = BAR_WIDTH / 2 * .9 )
556556 else :
557557 fig .line (
558558 'index' , source_name , source = source ,
559559 legend_label = legend_label , line_color = color ,
560560 line_width = 1.3 )
561561 else :
562562 if is_scatter :
563- r = fig .scatter (
563+ r = fig .circle (
564564 'index' , source_name , source = source ,
565565 legend_label = LegendStr (legend_label ), color = color ,
566- marker = 'circle' , radius = BAR_WIDTH / 2 * .9 )
566+ radius = BAR_WIDTH / 2 * .6 )
567567 else :
568568 r = fig .line (
569569 'index' , source_name , source = source ,
0 commit comments