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

Increased code flexibility #34

Merged
merged 4 commits into from
Mar 22, 2022
Merged

Increased code flexibility #34

merged 4 commits into from
Mar 22, 2022

Conversation

binelp
Copy link

@binelp binelp commented Mar 17, 2022

I have introduced the opportunity to plot asymmetric violins by providing a double set of data as array of cells (two element cell array).
Example of usage now:

violinplot({x,y},[1,2,3],'ShowData',false,'ViolinColor',{rand(4,3),[0 0 0]},...
'ViolinAlpha',{0.85,0.15},'ShowBox',false,'ShowMedian',false,'ShowWhiskers',false);

Combinations of single alpha values or multiple, single colors or multiple are possible.
Further, I have changed the code to allow removing the boxplot completely (including median and whiskers, and central dot), change the box width, and the line width for the median line.

@bastibe
Copy link
Owner

bastibe commented Mar 17, 2022

That's awesome! Could you show me a screen shot of the asymmetric violins? I don't have access to Matlab any longer, so I can't test it myself.

Does it break any backwards compatibility?

@binelp
Copy link
Author

binelp commented Mar 21, 2022

Here you see the screens you requested made with some data of mine, the screen of the original test, and the screen of a two-sided version. I tried to do a systematic testing and it should be fully backcompatible. Unfortunately, since the test file does not cover all possible construction possibilities I cannot be 100% sure, but I did extend the test file, too. I expect very minor bugs to be raised.

Capture3
Capture2
Capture1
Capture4

@bastibe
Copy link
Owner

bastibe commented Mar 21, 2022

Brilliant, thank you!

I'll merge it when you say it's ready.

@binelp
Copy link
Author

binelp commented Mar 21, 2022

Sure, nice to contribute.
I'd say it's ready. I'm not planning further testing atm!

@bastibe bastibe merged commit 5800110 into bastibe:master Mar 22, 2022
@bastibe
Copy link
Owner

bastibe commented Mar 22, 2022

Thank you very much for your contribution, then!

@bastibe
Copy link
Owner

bastibe commented Mar 22, 2022

If you want, you may add one of your fancier plots to the README, to show people what can be done.

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

Successfully merging this pull request may close these issues.

2 participants