| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A replacement for the traditional box and whisker plots provided in MATLAB (command boxplot). The categorical scatter plots additionally shows the data points, which is useful the visualize the underlying distribution (similar to violin plots).
The code is designed to be an extremely customizable alternate for the built in boxplot function in MATLAB. The syntax is very similar to that of boxplot. Below are some example usages for the function.
% load a sample dataset
load carsmall
% Use matlab's boxplot
boxplot(MPG,Origin)
title('Miles per Gallon by Vehicle Origin')
xlabel('Country of Origin')
ylabel('Miles per Gallon (MPG)')
The traditional box plot of the car sample dataset looks like this:
% Use CategoricalScatterplot
CategoricalScatterplot(MPG,Origin)
title('Miles per Gallon by Vehicle Origin')
xlabel('Country of Origin')
ylabel('Miles per Gallon (MPG)')
The categoricalscatterplot of the same sample dataset looks like this:
% A minimalistic categorical scatter plot CategoricalScatterplot(MPG,cellstr(Origin),'WhiskerLine',false,'BoxColor',[0.8471 0.8627 0.8392],'WhiskerColor',[0.8235 0.7412 0.0392])
Categorical Scatter plots can easily be customized using the input arguments to the function. Here is a minimalistic version of the above plot:
X - Input Data - vector or a matrix (Group required if X is a vector)
####Plot parameters (to tweak style): Scatter parameters:
Plotting styles:
| Back | FazBrowse Home | New Git URL |