This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Data Distribution Plots

Histograms, pie charts, word clouds, and more

Visualize the distribution of data using plots such as histograms, pie charts, or word clouds. For example, use a histogram to group data into bins and display the number of elements in each bin.

Functions

expand all

Histograms

histogramHistogram plot
histogram2Bivariate histogram plot
morebinsIncrease number of histogram bins
fewerbinsDecrease number of histogram bins
histcountsHistogram bin counts
histcounts2Bivariate histogram bin counts

Scatter Plots

scatterScatter plot
scatter33-D scatter plot
binscatterBinned scatter plot
scatterhistogramCreate scatter plot with histograms
spyVisualize sparsity pattern
plotmatrixScatter plot matrix

Pie Charts

piePie chart
pie33-D pie chart
heatmapCreate heatmap chart
sortxSort elements in heatmap row
sortySort elements in heatmap column
wordcloudCreate word cloud chart from text data
parallelplotCreate parallel coordinates plot

Properties

expand all

Histogram PropertiesHistogram appearance and behavior
Histogram2 PropertiesHistogram2 appearance and behavior
Scatter PropertiesScatter chart appearance and behavior
ScatterHistogramChart PropertiesControl scatter histogram chart appearance and behavior
Binscatter PropertiesBinscatter appearance and behavior
HeatmapChart PropertiesHeatmap chart appearance and behavior
WordCloudChart PropertiesControl word cloud chart appearance and behavior
ParallelCoordinatesPlot PropertiesControl parallel coordinates plot appearance and behavior

Topics

Add Legend to Pie Chart

This example shows how to add a legend to a pie chart that displays a description for each slice.

Offset Pie Slice with Greatest Contribution

This example shows how to create a pie graph and automatically offset the pie slice with the greatest contribution.

Label Pie Chart With Text and Percentages

When you create a pie chart, MATLAB labels each pie slice with the percentage of the whole that slice represents.

Color Analysis with Bivariate Histogram

This example shows how to adjust the color scale of a bivariate histogram plot to reveal additional details about the bins.

Data Cursors with Histograms

When you use the Data Cursor tool on a histogram plot, it customizes the data tips it displays in an appropriate way.

Control Categorical Histogram Display

This example shows how to use histogram to effectively view categorical data.

Create Heatmap from Tabular Data

This example shows how to create a heatmap from a table and how to modify the heatmap appearance.

Create Word Cloud from String Arrays

This example shows how to create a word cloud from plain text by reading it into a string array, preprocessing it, and passing it to the wordcloud function.

Explore Table Data Using Parallel Coordinates Plot

This example shows how to create a parallel coordinates plot from a table and how to modify the appearance of the plot.

Replace Discouraged Instances of hist and histc

histogram, histcounts, and discretize are the recommended histogram creation and computation functions for new code.