-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from HoldenLab/master
Plot violins in a specified order
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
% TEST CASE 1 | ||
display('Test 1: Violin plot default options'); | ||
load carbig MPG Origin | ||
Origin = cellstr(Origin); | ||
figure | ||
vs = violinplot(MPG, Origin); | ||
ylabel('Fuel Economy in MPG'); | ||
xlim([0.5, 7.5]); | ||
|
||
display('Test 1 passed ok'); | ||
|
||
% TEST CASE 2 | ||
display('Test 2: Test the plot ordering option'); | ||
grouporder={'USA','Sweden','Japan','Italy','Germany','France','England'}; | ||
|
||
figure; | ||
vs2 = violinplot(MPG,Origin,'GroupOrder',grouporder); | ||
display('Test 2 passed ok'); | ||
|
||
%other test cases could be added here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters