Hi everyone! I faced a problem. I want to deploy two graphs on one figure, but this has very different values on Cartesian axis… and when I do it one of them turns into a line
my code:
main_data = pd.read_csv(‘12.txt’,delimiter = ‘;’,names=[‘Received’,‘ExchTime’,‘OrderId’,‘Price’,‘Amount’,‘AmountRest’,‘DealId’,‘DealPrice’,‘OI’,‘Flags’],
nrows= 50000,low_memory=False)
deals = main_data[[‘ExchTime’,‘DealPrice’]][3:]
deals1 = deals[deals[‘DealPrice’]!=‘0’]
times = deals1[‘ExchTime’]
deals2 = deals1[‘DealPrice’]
open_int_1 = main_data[[‘ExchTime’,‘DealPrice’,‘OI’]][3:]
open_int_1 = open_int_1[open_int_1[‘DealPrice’]!=‘0’]
open_int_true = open_int_1[‘OI’]
fig = go.Figure()
fig.add_trace(
go.Scatter(
x=times,
y=deals2,
))
fig.add_trace(
go.Histogram(
x=times,
y=open_int_true,
marker={‘color’:‘green’}
))
fig.show()
result: