PairedBarChart

PairedBarChart[{y1,y2,},{z1,z2,}]

makes a paired bar chart with bar lengths y1, y2, and z1, z2, , respectively.

PairedBarChart[{,wi[yi,],},{,wj[zj,],}]

makes a paired bar chart with bar features defined by the symbolic wrappers wk.

PairedBarChart[{data11,},{data21,}]

makes a paired bar chart from multiple datasets data1i and data2j.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Generate a paired bar chart from two lists of heights:

Use categorical labels:

Categorical legends:

Chart several datasets:

Scope  (34)

Data and Layouts  (13)

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:

The data may include units:

Specify the units to use:

The time stamps in TimeSeries, EventSeries, and TemporalData are ignored:

The values in associations are taken as the heights of the bars:

Use the keys as labels:

Use the keys as legends:

Associations can be nested:

The weights in WeightedData are ignored:

The censoring and truncation information in EventData is ignored:

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:

Wrappers  (5)

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:

Styling and Appearance  (8)

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 Palettes ChartElementSchemes:

Use a theme with detailed frame ticks and grid lines:

Use a theme with simple ticks and edge-fading rectangles in a high contrast color scheme:

Labeling and Legending  (8)

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 Placed to affect the positioning of legends:

Options  (70)

BarOrigin  (1)

Specify the bar origin:

BarSpacing  (6)

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:

ChartBaseStyle  (5)

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:

ChartBaseStyle combines with ColorFunction:

ColorFunction may override settings for ChartBaseStyle:

ChartElements  (9)

Create a pictorial chart based on any Graphics object:

Graphics3D:

Image:

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:

ChartElementFunction  (6)

Get a list of built-in settings for ChartElementFunction:

For detailed settings, use Palettes ChartElementSchemes:

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 Palettes ChartElementSchemes to set them:

ChartLabels  (5)

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  (5)

ChartLayout is grouped by default:

Use stacked bars:

Use percentile bars:

Use stepped bars:

Use overlapped bars:

ChartLegends  (6)

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:

ChartStyle  (7)

Use ChartStyle to style bars:

Give a list of styles:

Use "Gradient" colors from ColorData:

Use "Indexed" 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:

ColorFunction  (3)

Color by bar height:

Use ColorFunctionScaling->False to get unscaled height values:

ColorFunction overrides styles in ChartStyle:

Use ColorFunction to combine different style effects:

ColorFunctionScaling  (2)

By default scaled height values are used:

Use ColorFunctionScaling->False to get unscaled height values:

Joined  (5)

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:

LabelingFunction  (3)

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:

LabelingSize  (3)

Textual labels are shown at their actual sizes:

Image labels are automatically resized:

Specify a maximum size for textual labels:

Specify a maximum size for image labels:

PerformanceGoal  (3)

Generate a paired bar chart with interactive highlighting:

Emphasize performance by disabling interactive behaviors:

Typically less memory is required for non-interactive charts:

PlotTheme  (1)

Use a theme with simple ticks and grid lines in a high contrast color scheme:

Change the color function:

Applications  (3)

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 G7:

Properties & Relations  (3)

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:

Possible Issues  (1)

PairedBarChart does not accept negative values:

Introduced in 2010
 (8.0)
 |
Updated in 2012
 (9.0)
2014
 (10.0)
2018
 (11.3)