Skip to content

Commit

Permalink
Merge pull request #73 from fhaefele/violin_orientation
Browse files Browse the repository at this point in the history
Added 'Orientation' parameter for vertical and horizontal layouts
  • Loading branch information
bastibe authored Jul 15, 2024
2 parents d922d23 + f529607 commit ada5186
Show file tree
Hide file tree
Showing 6 changed files with 845 additions and 752 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,21 @@ You can also play around with the different options, and tune your violin plots

```matlab
grouporder={'England','Sweden','Japan','Italy','Germany','France','USA'};
color = jet(length(grouporder));
pos = 3;
vs = Violin({MPG(strcmp(Origin, grouporder{pos}))},...
position,...
pos,...
'HalfViolin','right',...% left, full
'QuartileStyle','shadow',... % boxplot, none
'DataStyle', 'histogram',... % scatter, none
'ShowNotches', false,...
'ShowMean', false,...
'ShowMedian', true,...
'ViolinColor', color);
'ViolinColor', {color(pos,:)},...
'Orientation', 'horizontal');
ylim(pos + [-.5, 0.5])
yticks(pos)
yticklabels(grouporder{pos})
```
![example image2](example2.png)

Expand Down
Loading

0 comments on commit ada5186

Please sign in to comment.