Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Go.scatter mode scatter and lines+scatter gives different behaviour

$
0
0


I think that the problem is about x_axis range, in fact e

this is my code to plot my data which is dataframe of sorted datetime in the index and number of persons in nb_vald column.

data_list =
for journey in dates:
data = new_data[new_data[‘jour’].values== journey].set_index(‘idnt_trnc_horr_vald’)
data_list.append(
go.Scatter(x = data.index,
y=list(data.nb_vald),
name=journey,mode=‘lines+scatter’
) )
layout = go.Layout({‘clickmode’: ‘event+select’},
xaxis={‘title’: ‘Temps’,‘rangemode’:‘normal’,‘autorange’:True, ‘range’ : [datetime.time(0, 0),datetime.time(23, 45)]},
yaxis={‘title’: 'nbre person ',‘autorange’:True}

)    

fig= go.Figure(data=data_list, layout= layout) #go.Figure()
py.iplot(fig)

my data.index is varying between datetime.time(0, 0),datetime.time(23, 45), which I try to fix by fixing a xaxis range.

Thank you,

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images