Skip to content

Commit

Permalink
Added test case script
Browse files Browse the repository at this point in the history
Added a test script to test the default violinplot and the new plot ordering option before I make further changes
  • Loading branch information
seamusholden committed Jul 17, 2019
1 parent c2f3a05 commit 03f0ed2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test_cases/testviolinplot.m
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

0 comments on commit 03f0ed2

Please sign in to comment.