I have a dummy data looking like this. I was satisfied when I plotted in with px.line
like this:
df_grp = pd.read_csv('dummy_day_temp_humidity.txt')
px.line(df_grp, x='temperature', y='humidity', color='day')
But then I decided to make a bar chart out of it, using the same code I only substituted .line
for .bar
:
px.bar(df_grp, x='temperature', y='humidity', color='day')
But this resulted in a plot, where the bars are stacked additively on top of each, e.g. making the humidity for Thur no longer =1, but ~3.8 and analogously for the other days.
The same happened for px.area
. My questions:
1.) How can I unstack (un-accumulate) the values on the y-axis in px.line
and px.area
for the different days? Can I make the bars/areas semi-transparent, so that the ones in the background shine through (something like the alpha
-value in matplotlib)?
2.) Another thing that I would like is to have this displayed with the same x and y data in a ridgeline plot, the depth dimension being the days. Is this possible? I have only seen Ridgeline plots to work in plotly when you use plotly.violin
, I tried it with px.line
and all the tracks ended up overlapping each other into 1 track, as you can read in my post here