image thumbnail

MATLAB Plot Gallery - Histogram Plot

by

 

24 Feb 2012 (Updated )

Create a histogram plot

Histogram_Plot

This is an example of how to create a histogram plot in MATLAB®.

Read about the hist function in the MATLAB documentation.

For more examples, go to MATLAB Plot Gallery

% Load nucleotide data
load nucleotideData ncount

% Create the histogram using the hist function
figure
hist(ncount)
colormap summer

% Add a legend
legend('A', 'C', 'G', 'T')

% Add title and axis labels
title('Histogram of nucleotide type distribution')
xlabel('Occurrences')
ylabel('Number of sequence reads')

Contact us