Plotly show last 8 hours as default range on x axis

Hi guys,

I am accessing data directly from sqlite>numpy>xaxis. It’s a current timestamp in the database, but when transformed to numpy it comes out as a string. Still, if I plot it, it works just fine.

But the problem is I would not like to plot whole data at once(a couple of days) Is there any plotlyinc solution, to plot only last 8 hours of data into a graph to be represented as default range?

I know pretty much how to solve it, but since I am new to Plotly I am open for any suggestions. Thank you

Hi @MalikaBanalika,

If you’d like to plot all of the data, but only show a subset of times by default you could specify the xaxis date range as shown in https://www.plot.ly/python/time-series/#manually-set-range.

Hope that helps,
-Jon

Hi @jmmease, Yes I used that. Thank you

1 Like