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

YLim is not updated with multiple rainclouds (Matlab) #54

Open
matsvanes opened this issue Nov 18, 2021 · 0 comments
Open

YLim is not updated with multiple rainclouds (Matlab) #54

matsvanes opened this issue Nov 18, 2021 · 0 comments

Comments

@matsvanes
Copy link
Contributor

I'm using this package all the time. I notice that if you plot two rainclouds in one figure, the YLim doesn't always scale with the data.
Below is an example. The first raincloud plot determines the YLim, so in case the y range of the second raincloud is larger, it'll fall of the figure.

x1=rand(100,1); % create some distribution
x2=x1;
x2(x2>0.5)=x2(x2>0.5)-0.5; % create another, narrower distribution

figure;
h1 = raincloud_plot(x1, 'box_on', 1,  'alpha', 0.5,...
'box_dodge', 1, 'box_dodge_amount', .15, 'dot_dodge_amount', .15,...
'box_col_match', 0);
h2 = raincloud_plot(x2, 'box_on', 1, 'alpha', 0.5,...
'box_dodge', 1, 'box_dodge_amount', .35, 'dot_dodge_amount', .35, 'box_col_match', 0);

Proposed solution: include this line at the end of the end of the script:
ylim('tickaligned')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant