Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Plotting Outliers with stat_boxplot 2.0 #125

Open
jostro42 opened this issue Apr 6, 2022 · 1 comment
Open

Error Plotting Outliers with stat_boxplot 2.0 #125

jostro42 opened this issue Apr 6, 2022 · 1 comment
Labels

Comments

@jostro42
Copy link

jostro42 commented Apr 6, 2022

I ran into a similar problem that was reported in issue #86.

Error using horzcat
Dimensions of arrays being concatenated are not consistent.

Error in gramm/stat_boxplot>my_boxplot (line 81)
        outliersy=[outliersy ysel(sel_outlier)'];

Error in gramm/stat_boxplot>@(dobj,dd)my_boxplot(dobj,dd,p.Results) (line 24)
obj.geom=vertcat(obj.geom,{@(dobj,dd)my_boxplot(dobj,dd,p.Results)});

Error in gramm/draw (line 548)
                                        obj.geom{geom_ind}(obj,draw_data);

I could resolve this issue by changing line 81 in stat_boxplot.m to
outliersy=[outliersy ysel(sel_outlier)];

It seems that this problem does not arise if there are outliers in only one condition of the data, so I was able to successfully plot data with a different y variable. But as soon as there are outliers in both conditions, the error occurs.

My data has this format:

Yvar  fac1 fac2
val1  a      c
val2  a      d
val3  b      c
val4  b      d

I am not sure whether removing the apostrophe might cause different errors down the line, however.

I hope this helps somehow!

@piermorel
Copy link
Owner

Hi, and thanks for your feedback. I tried reproducing the issue but again was not able to, even with your description of outliers being present in only one or both conditions. The proposed solution seems to create problems more systematically on my side, as was the one proposed in #86.

It would be great if you could provide a minimally working example that causes the crash (with data provided as a mat file and your gramm code) so that I can look at it ? If you don't want to post it in the issue, you can send it to me by email at [email protected]

@piermorel piermorel added the bug label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants