This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

PairedBarChart

PairedBarChart
makes a paired bar chart with bar lengths , , ... and , , ..., respectively.
PairedBarChart
makes a paired bar chart with bar features defined by the symbolic wrappers .
PairedBarChart
makes a paired bar chart from multiple datasets and .
yia pure bar value
wi[yi,...]a bar with value and wrapper
formi->mia bar form with metadata
  • Data not given in these forms is taken to be missing, and typically yields a gap in the bar chart.
{e1,e2,...}list of elements with or without wrappers
w[{e1,e2,...},...]wrapper applied to a whole dataset
w[{data1,data1,...},...]wrapper applied to all datasets
  • The following wrappers can be used for chart elements:
Annotation[e,label]provide an annotation
Button[e,action]define an action to execute when the element is clicked
EventHandler[e,...]define a general event handler for the element
Hyperlink[e,uri]make the element act as a hyperlink
Labeled[e,...]display the element with labeling
Legended[e,...]include features of the element in a chart legend
Mouseover[e,over]make the element show a mouseover form
PopupWindow[e,cont]attach a popup window to the element
StatusArea[e,label]display in the status area when the element is moused over
Style[e,opts]show the element using the specified styles
Tooltip[e,label]attach an arbitrary tooltip to the element
AspectRatio1/GoldenRatiooverall ratio of width to height
AxesTruewhether to draw axes
BarOriginBottomorigin placement for bars
BarSpacingAutomaticfractional spacing between bars
ChartBaseStyleAutomaticoverall style for bars
ChartElementFunctionAutomatichow to generate raw graphics for bars
ChartElementsAutomaticgraphics to use in each of the bars
ChartLabelsNonelabels for data elements and datasets
ChartLayoutAutomaticoverall layout to use
ChartLegendsNonelegends for data elements and datasets
ChartStyleAutomaticstyle for bars
ColorFunctionAutomatichow to color bars
ColorFunctionScalingTruewhether to normalize arguments to ColorFunction
JoinedFalsewhether to join bars
LabelingFunctionAutomatichow to label bars
LegendAppearanceAutomaticoverall appearance of legends
PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
ScalingFunctionsNonehow to scale individual coordinates
  • Possible settings for BarOrigin include and .
  • With the setting BarSpacing, can be used to control the space between the pair of bar charts. The unit for is in fractions of the width of the resulting graphic.
  • The arguments supplied to ChartElementFunction are the bar region , the data value , and metadata from each level in a nested list of datasets.
Generate a paired bar chart from two lists of heights:
Use categorical labels:
Categorical legends:
Chart several datasets:
Generate a paired bar chart from two lists of heights:
In[1]:=
Click for copyable input
Out[1]=
 
Use categorical labels:
In[1]:=
Click for copyable input
Out[1]=
Categorical legends:
In[2]:=
Click for copyable input
Out[2]=
 
Chart several datasets:
In[1]:=
Click for copyable input
Out[1]=
Items in a dataset are grouped together:
Datasets do not need to have the same number of items:
Nonreal data is taken to be missing and typically yields a gap in the bar chart:
Use different layouts to display multiple datasets:
Stacked layouts are more compact in the horizontal direction:
Use Joined to indicate connections between data points:
Control the origin of bars:
Adjust the spacing between bars and groups of bars:
Use wrappers on individual data, datasets, or collections of datasets:
Wrappers can be nested:
Override the default tooltips:
Use any object in the tooltip:
Use PopupWindow to provide additional drilldown information:
Button can be used to trigger any action:
Use an explicit list of styles for the bars:
Use any gradient or indexed color schemes from ColorData:
Use color schemes designed for charting:
ChartBaseStyle can be used to set an initial style for all chart elements:
Style can be used to override styles:
Use any graphic for pictorial bars:
Use built-in programmatically generated bars:
For detailed settings use PalettesChartElementSchemes:
Use Labeled to add a label to a bar:
Use symbolic positions for label positions:
Provide categorical labels for the columns of data:
For rows of data:
For both:
For datasets:
Use Placed to control the positioning of labels, using the same positions as for Labeled:
Provide value labels for bars by using LabelingFunction:
Use Placed to control placement and formatting:
Add categorical legend entries for the columns of data:
For rows of data:
For datasets:
Use Legended to add additional legend entries:
Use Placed to affect the positioning of legends:
Specify the bar origin:
Use automatically determined spacing between bars:
Use no spacing between bars:
Use symbolic presets:
Use explicit spacing between bars:
Use explicit spacing between bar pairs:
Use explicit spacing between bars, groups of bars, and bar pairs:
Use ChartBaseStyle to style bars:
ChartBaseStyle combines with ChartStyle:
ChartStyle may override settings for ChartBaseStyle:
ChartBaseStyle combines with Style:
Style may override settings for ChartBaseStyle:
ColorFunction may override settings for ChartBaseStyle:
Create a pictorial chart based on any Graphics object:
Use a stretched version of the graphic:
Use explicit sizes for width and height:
Without AspectRatio->Full, the original aspect ratio is preserved:
Using All for width or height causes that direction to stretch to the full size of the bar:
Use a different graphic for each column of data:
Use a different graphic for each row of data:
Use a different graphic for each bar pair:
Graphics are used cyclically:
Styles are inherited from styles set through ChartStyle etc.:
Explicit styles set in the graphic will override other style settings:
The orientation of the pictorial graphic is unaffected by BarOrigin:
Get a list of built-in settings for ChartElementFunction:
For detailed settings, use PalettesChartElementSchemes:
This ChartElementFunction is appropriate to show the global scale:
Write a custom ChartElementFunction:
Use metadata passed on from the input, in this case charting the data:
Built-in element functions may have options; use PalettesChartElementSchemes to set them:
By default labels are placed in the central axis:
Labeled wrappers in data will place additional labels:
Use Placed to control label placement:
Place labels on each group of bars:
Using Placed:
Place labels on each bar pair:
Specify labels for bars, groups of bars, and bar pairs:
ChartLayout is grouped by default:
Use stacked bars:
Use percentile bars:
Use stepped bars:
Use overlapped bars:
Generate a legend based on chart style:
Use Legended to add additional legend entries:
Use Legended to specify individual legend entries:
Generate a legend for bar pairs:
Create legends for bars and bar pairs:
Use Placed to control the placement of legends:
Use ChartStyle to style bars:
Give a list of styles:
Use colors from ColorData:
Use colors from ColorData:
Styles are used cyclically:
Style each column of data:
Style each row of data:
Style each bar pair:
Style each side of the pair and both rows and columns of data:
With row, column, and pair styles the latter styles may override earlier ones:
Style overrides settings for ChartStyle:
ColorFunction overrides settings for ChartStyle:
ChartElements may override settings for ChartStyle:
Color by bar height:
Use ColorFunctionScaling->False to get unscaled height values:
ColorFunction overrides styles in ChartStyle:
Use ColorFunction to combine different style effects:
By default scaled height values are used:
Use ColorFunctionScaling->False to get unscaled height values:
By default bars are not joined:
Join the centers of the tops of the bars:
Join the corners of the bars:
Join bars with different bar origins:
Join groups of bars:
Join stacked bars:
Join stepped bars:
Use automatic labeling by values through Tooltip and StatusArea:
Do no labeling:
Use the given chart labels as arguments to the labeling function:
Place complete labels as tooltips:
Generate a paired bar chart with interactive highlighting:
Emphasize performance by disabling interactive behaviors:
Typically less memory is required for non-interactive charts:
Population pyramid of the United States using 2008 data:
Population pyramid of the United States showing marital status:
Compare import and export values for countries in the G8:
BarChart plots multiple datasets on a common height axis; PairedBarChart on a categorical axis:
PairedHistogram computes heights from arbitrary data:
PairedBarChart uses heights directly:
PieChart shows multiple datasets in rings:
PairedBarChart does not accept negative values:
New in 8