Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Pie Charts, Bar Plots, and Histograms

Proportion and distribution of data

Functions

barBar graph
bar3Plot 3-D bar graph
barhPlot bar graph horizontally
bar3hPlot horizontal 3-D bar graph
histogramHistogram plot
histogram2Bivariate histogram plot
morebinsIncrease number of histogram bins
fewerbinsDecrease number of histogram bins
histcountsHistogram bin counts
histcounts2Bivariate histogram bin counts
binscatterBinned scatter plot
roseAngle histogram plot
paretoPareto chart
areaFilled area 2-D plot
piePie chart
pie33-D pie chart

Properties

Bar PropertiesControl bar chart appearance and behavior
Area PropertiesControl area chart appearance and behavior
Histogram PropertiesControl histogram appearance and behavior
Histogram2 PropertiesControl histogram2 appearance and behavior
Binscatter PropertiesControl binscatter appearance and behavior

Topics

Modify Baseline of Bar Graph

This example shows how to modify properties of the baseline of a bar graph.

Overlay Bar Graphs

This example shows how to overlay two bar graphs and specify the bar colors and widths.

Types of Bar Graphs

Bar graphs are useful for viewing results over a period of time, comparing results from different data sets, and showing how individual elements contribute to an aggregate amount.

Combine Line and Bar Charts Using Two y-Axes

This example shows how to combine a line chart and a bar chart using two different y-axes.

Color 3-D Bars by Height

This example shows how to modify a 3-D bar plot by coloring each bar according to its height.

Compare Data Sets Using Overlayed Area Graphs

This example shows how to compare two data sets by overlaying their area graphs.

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.

Add Legend to Pie Chart

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

Label Pie Chart With Text and Percentages

This example shows how to label slices on a pie chart so that the labels contain custom text and the precalculated percent values for each slice.

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.

Replace Discouraged Instances of hist and histc

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

Was this topic helpful?