Pie Charts, Bar Plots, and Histograms
Functions
bar |
Bar graph |
bar3 |
Plot 3-D bar graph |
barh |
Plot bar graph horizontally |
bar3h |
Plot horizontal 3-D bar graph |
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 |
binscatter |
Binned scatter plot |
rose |
Angle histogram plot |
pareto |
Pareto chart |
Properties
Bar Properties | Bar chart appearance and behavior |
Area Properties | Area chart appearance and behavior |
Histogram Properties | Histogram appearance and behavior |
Histogram2 Properties | Histogram2 appearance and behavior |
Binscatter Properties | Binscatter appearance and behavior |
Topics
This example shows how to modify properties of the baseline of a bar graph.
This example shows how to overlay two bar graphs and specify the bar colors and widths.
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
这个例子展示了如何combine a line chart and a bar chart using two differenty-axes.
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.
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.
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 usehistogram
to effectively view categorical data.
Replace Discouraged Instances of hist and histc
histogram
,histcounts
, anddiscretize
are the recommended histogram creation and computation functions for new code.