Main Content

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

histogram Histogram plot
histogram2 Bivariate histogram plot
morebins Increase number of histogram bins
fewerbins Decrease number of histogram bins
histcounts Histogram bin counts
histcounts2 Bivariate histogram bin counts
boxchart Create box chart (box plot)
swarmchart Swarm scatter chart
swarmchart3 3-D swarm scatter chart
bubblechart Bubble chart
bubblechart3 3-D bubble chart
bubblelim Map bubble sizes to data range
bubblesize Set minimum and maximum bubble sizes in points
bubblelegend Create legend for bubble chart
scatter Scatter plot
scatter3 3-D scatter plot
binscatter Binned scatter plot
scatterhistogram Create scatter plot with histograms
spy Visualize sparsity pattern of matrix
plotmatrix Scatter plot matrix
parallelplot Create parallel coordinates plot
pie Pie chart
pie3 3-D pie chart
的热图 Create heatmap chart
排序x Sort elements in heatmap row
排序y Sort elements in heatmap column
wordcloud Create word cloud chart from text data

Properties

expand all

BoxChart Properties Control box chart appearance and behavior
Binscatter Properties Binscatter appearance and behavior
BubbleChart Properties Bubble chart appearance and behavior
BubbleLegend Properties Bubble legend appearance and behavior
HeatmapChart Properties Heatmap chart appearance and behavior
Histogram Properties 直方图外观和行为
Histogram2 Properties Histogram2 appearance and behavior
Scatter Properties Scatter chart appearance and behavior
ScatterHistogramChart Properties Control scatter histogram chart appearance and behavior
ParallelCoordinatesPlot Properties Control parallel coordinates plot appearance and behavior
WordCloudChart Properties Control word cloud chart appearance and behavior

Topics

Add Legend to Pie Chart

这个例子商店ws how to add a legend to a pie chart that displays a description for each slice.

Offset Pie Slice with Greatest Contribution

这个例子商店ws 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

这个例子商店ws how to adjust the color scale of a bivariate histogram plot to reveal additional details about the bins.

Control Categorical Histogram Display

这个例子商店ws how to usehistogramto effectively view categorical data.

Create Heatmap from Tabular Data

这个例子商店ws how to create a heatmap from a table and how to modify the heatmap appearance.

Create Word Cloud from String Arrays

这个例子商店ws how to create a word cloud from plain text by reading it into a string array, preprocessing it, and passing it to thewordcloudfunction.

Explore Table Data Using Parallel Coordinates Plot

这个例子商店ws 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, anddiscretizeare the recommended histogram creation and computation functions for new code.