I am trying to make a boxplot using Gadfly but all I see are straight vertical lines. Also, this seems to be a very tricky issue. It only happens for a specific combination of data points, and I am not able to figure out what’s wrong. I have replicated the issue using fake data below, please help me understand what may I be missing?
Also, there are 2 issues that this dataset is causing.
The major issue is that I am seeing all vertical lines
If I try to make the plot differently, I do see box plots but then the left most and the right most end of the plot is getting trimmed away.
I would really appreciate if anyone can help with a workaround for issue 2. It’s a bit important for me right now. By workaround I mean if I can make any adjustments through spacing etc in Themes to fix the issue. I cannot really change the format of the plot given the actual requirement in my work where this (kind of) plot is needed.
gadfly is getting confused because the models for type1 (one, two, three) are not the same as the models for type 2 (four, five, six). is this really the nature of your data? if i change your example so that they are (ie type2 models are also one, two, three), then the output looks reasonable:
Thanks a lot @bjarthur for the workaround suggestion.
Yes, that’s the nature of the data. I have two different categories that defines my models. I want the x axis to show a property of the model (which I represented as one, two, three here). Given both categories do not have any overlapping properties, my x-axis is unique between categories.
I wanted readers to clearly see the two categories (it’s not obvious from the x-axis). Hence, I was playing with either differentiating the categories by grids or by color. This way I was hoping, the different categories will pop out to the readers.
Also I am putting the property of the model in x axis because the y axis metric has a linear (kind of) relation with x axis (property of model). Interestingly, as the category changes, the degree of linear relationship changes too. Hence, I wanted to pop this information in my graph.