@@ -144,7 +144,7 @@ def _group_trades(column):
144
144
def f (s , new_index = pd .Index (df .index .view (int )), bars = trades [column ]):
145
145
if s .size :
146
146
# 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 ())
148
148
new_bar_idx = new_index .get_indexer ([mean_time ], method = 'nearest' )[0 ]
149
149
return new_bar_idx
150
150
return f
@@ -440,11 +440,11 @@ def _plot_superimposed_ohlc():
440
440
"""Superimposed, downsampled vbars"""
441
441
time_resolution = pd .DatetimeIndex (df ['datetime' ]).resolution
442
442
resample_rule = (superimpose if isinstance (superimpose , str ) else
443
- dict (day = 'M ' ,
443
+ dict (day = 'ME ' ,
444
444
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 ))
448
448
if not resample_rule :
449
449
warnings .warn (
450
450
f"'Can't superimpose OHLC data with rule '{ resample_rule } '"
@@ -548,22 +548,22 @@ def __eq__(self, other):
548
548
if is_overlay :
549
549
ohlc_extreme_values [source_name ] = arr
550
550
if is_scatter :
551
- fig .scatter (
551
+ fig .circle (
552
552
'index' , source_name , source = source ,
553
553
legend_label = legend_label , color = color ,
554
554
line_color = 'black' , fill_alpha = .8 ,
555
- marker = 'circle' , radius = BAR_WIDTH / 2 * 1.5 )
555
+ radius = BAR_WIDTH / 2 * .9 )
556
556
else :
557
557
fig .line (
558
558
'index' , source_name , source = source ,
559
559
legend_label = legend_label , line_color = color ,
560
560
line_width = 1.3 )
561
561
else :
562
562
if is_scatter :
563
- r = fig .scatter (
563
+ r = fig .circle (
564
564
'index' , source_name , source = source ,
565
565
legend_label = LegendStr (legend_label ), color = color ,
566
- marker = 'circle' , radius = BAR_WIDTH / 2 * .9 )
566
+ radius = BAR_WIDTH / 2 * .6 )
567
567
else :
568
568
r = fig .line (
569
569
'index' , source_name , source = source ,
0 commit comments