i`ve got a problem using my timestamps as y-axis. This currently is my pandas dataframe.
Time Day Type 0 00:03:37 2020-05-31 LikedPosts 1 00:20:09 2020-10-09 Follower 2 00:50:57 2020-11-28 LikedPosts 3 01:25:31 2020-06-06 LikedPosts 4 01:26:14 2020-06-06 LikedPosts .. ... ... ... 366 22:50:46 2019-12-14 Following 367 22:50:49 2019-12-14 Follower 368 22:51:12 2020-06-06 LikedPosts 369 23:02:35 2020-08-22 LikedPosts 370 23:37:45 2020-03-27 Follower
I tried to build a scatter on many ways but the results seems to be the same.
As soon as i try to use the Types in the scatter my timestamps seems to be stacked based on the Types i choose.
I tried building it up with go:
Zeitcol = ['Follower','Following','Comments','Posts','Stories','LikedPosts','LikedComments','LoginActivity'] df = jf.json_function.normalize_Time_data(Zeit) fig = go.Figure() for key in Zeitcol: fig.add_trace(go.Scatter( x=df.Day[df.Type == key], y=df.Time[df.Type == key], name=key, marker_color=Color[key], )) fig.update_traces(mode='markers', marker_line_width=1, marker_size=7) return fig
which results in the picture above, as well as with px.scatter()
df = jf.json_function.normalize_Time_data(Zeit) fig = px.scatter(df,x='Day',y=df.Time,color='Type') return fig
pretty much the same issue.
Once i remove color=‘Type’, time ordering seems to be ok, but my Types are missing then of course.
Appreciate any help getting this solved.