Open TheWildParamecium opened 3 months ago
I have just noticed that the same anomalous behavior also occurs when trying to use the grouping factors with boxplots.
It works fine with grouping factors given in one way:
But not when given in the inverse way:
What am I missing? You are grouping the data by the same groups so the data is not going to change. The only thing that will change is the order in which the factors are displayed. Can you please explain what you were expecting?
Yes, you are right about that.
The problem is precisely that the grouping order is not being done correctly in the second case, since by the given grouping factors order, I would expect the labels (and the 4 bars of grouped data displayed) to be ‘abstracts, paper, abstract, paper’ for the first level/row on the X-axis labels and ‘DO, Ehrhart’ for the second level/row of the X-axis labels, with the data also being displayed that way respectively.
I don't know if I'm making myself clear, but I can try to manually modify the figure to show it visually if necessary.
Edit: I finally did a mock example to illustrate it.
Good morning Isaac.
I am sorry to bother you again. Is there any update on this issue?
Ooops. I drop the ball here sorry
Is this the expected behavior?
Good afternoon.
Please don't worry, it is fine. So sorry by my side, I was the one that completely forgot about this issue.
Yes, exactly! Now I see that the boxplots are being properly displayed according to the order of the grouping factors, so I am completely satisfied with that.
Just a minor matter to comment on (nothing of concern, it would be fine anyway), it is just that I expected the style of labels on the X-axis to follow the format of the second image you have shown.
Applied to the first image, it would be like to flip the labels shown above (do and ehrhart)x2 to the bottom level, and conversely, the labels on the top level (closest to the graph) would be (abstracts and papers)x4.
I am attaching below a modified image of how I would have expected the first image:
Good morning, I hope you are well.
I was writing this issue because I have found an unexpected behavior in the way grouping factors are generated for a barplot.
When I use the grouping factors inside the config in the following order:
'groupingFactors': ['dataset', 'doc_type']
The plot comes out as you would expect:
However, when I use the opposite grouping order:
'groupingFactors': ['doc_type', 'dataset']
I get the following plot:
Where you can see that the arrangement of the bars in the plot has not changed and that only the values of the grouping labels below the X-axis have been changed, although it is still the order ['dataset', 'doc_type' ] instead of ['doc_type' , 'dataset'].
I leave all the additional information of how the graphic has been created in the figure itself generated with CanvasXpress, but if you need any additional information just let me know.
Thank you very much for your help.
Best wishes, Jesus