I have a dataset in which I have, for the sake of simplification, 4 relevant variable:
“manufacturing year”, named “year” (trace name)
“% of moisture (storage)”, named “moisture” (xaxis)
“number of month (storage)”, named “month” (yaxis)
“grade” (marker size)
For the sake of readibility, I’ve made 3 subplots. This part is done:
On the left: if the % of moisture or if the number of months are in the lowest 10th percentile.
On the right: as above, but for the highest 10th percentile
In the middle: for what’s not an extrema.
So far I’ve tried 3 things:
- plotting my traces by year, no consideration for the quartile → all the data are plotted on the same subplot, because xaxis value is …x . No surprise. The number of legends matches the number of different years,
- plotting my traces by year, and by quartile (that is, kind of 3 dataset) → I get a lot of traces. Typically, the 13 items in the worst quartile (trace#1 for 2 items (2013), trace#2 for 3 items (2014), trace#3 for 1 item in 2016, trace#4 for 5 items in 2018, trace#5 for 2 items of 2019), then the 132 items “in the average” in the main graph (middle, traces 6 to 37)) and finally 7 items in the graph on the right. Then, there are too many legends. I would like that the year appears only once in the legend, without hacky solution. I’m aware I can group the legends, but this wont avoid the duplication of the year in the list of legends;
- plotting my traces by year, and by quartile, so that if for a given trace (2013), I have 8 observations (2 in the worst quartile, 1 in the best), their respective axis got set to x1, x2 or x3. But that does not work because xaxis can’t be a list of ids. It seems that it can only be a string, which is applied to each observation of the trace.
Is it possible for 1 trace to be spread over 3 different subplots, depending on the axis we set their observations?
Is there another way to achieve the same result?