WOLFRAM

PairedBarChart
PairedBarChart

Updatedshow changeshide changes

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)Summary of the most common use cases

Generate a paired bar chart from two lists of heights:

Out[1]=1

Use categorical labels:

Out[1]=1

Categorical legends:

Out[2]=2

Chart several datasets:

Out[1]=1

Scope  (35)Survey of the scope of standard use cases

Data and Layouts  (13)

Items in a dataset are grouped together:

Out[1]=1

Datasets do not need to have the same number of items:

Out[1]=1

Nonreal data is taken to be missing and typically yields a gap in the bar chart:

Out[1]=1

The data may include units:

Out[1]=1

Specify the units to use:

Out[1]=1

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

Out[1]=1

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

Out[1]=1

Use the keys as labels:

Out[2]=2

Use the keys as legends:

Out[3]=3

Associations can be nested:

Out[1]=1

The weights in WeightedData are ignored:

Out[1]=1

The censoring and truncation information in EventData is ignored:

Out[2]=2

Use different layouts to display multiple datasets:

Out[1]=1

Stacked layouts are more compact in the horizontal direction:

Out[1]=1

Use Joined to indicate connections between data points:

Out[2]=2

Control the origin of bars:

Out[1]=1

Adjust the spacing between bars and groups of bars:

Out[1]=1

Tabular Data  (1)

Get tabular data:

Out[1]=1

Compare number of males and females per age range:

Out[2]=2

Wrappers  (5)

Use wrappers on individual data, datasets, or collections of datasets:

Out[1]=1

Wrappers can be nested:

Out[1]=1

Override the default tooltips:

Out[1]=1

Use any object in the tooltip:

Out[2]=2

Use PopupWindow to provide additional drilldown information:

Out[1]=1

Button can be used to trigger any action:

Out[1]=1

Styling and Appearance  (8)

Use an explicit list of styles for the bars:

Out[1]=1

Use any gradient or indexed color schemes from ColorData:

Out[1]=1

Use color schemes designed for charting:

Out[1]=1
Out[2]=2

ChartBaseStyle can be used to set an initial style for all chart elements:

Out[1]=1

Style can be used to override styles:

Out[1]=1

Use any graphic for pictorial bars:

Out[1]=1

Use built-in programmatically generated bars:

Out[1]=1
Out[2]=2

For detailed settings use Palettes ChartElementSchemes:

Out[3]=3

Use a theme with detailed frame ticks and grid lines:

Out[1]=1

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

Out[2]=2

Labeling and Legending  (8)

Use Labeled to add a label to a bar:

Out[1]=1

Use symbolic positions for label positions:

Out[1]=1

Provide categorical labels for the columns of data:

Out[1]=1

For rows of data:

Out[2]=2

For both:

Out[3]=3

For datasets:

Out[4]=4

Use Placed to control the positioning of labels, using the same positions as for Labeled:

Out[1]=1

Provide value labels for bars by using LabelingFunction:

Out[1]=1

Use Placed to control placement and formatting:

Out[2]=2

Add categorical legend entries for the columns of data:

Out[1]=1

For rows of data:

Out[2]=2

For datasets:

Out[3]=3

Use Placed to affect the positioning of legends:

Out[1]=1

Options  (70)Common values & functionality for each option

BarOrigin  (1)

Specify the bar origin:

Out[1]=1

BarSpacing  (6)

Use automatically determined spacing between bars:

Out[1]=1

Use no spacing between bars:

Out[1]=1

Use symbolic presets:

Out[1]=1

Use explicit spacing between bars:

Out[1]=1

Use explicit spacing between bar pairs:

Out[1]=1

Use explicit spacing between bars, groups of bars, and bar pairs:

Out[1]=1

ChartBaseStyle  (5)

Use ChartBaseStyle to style bars:

Out[1]=1
Out[2]=2
Out[3]=3

ChartBaseStyle combines with ChartStyle:

Out[1]=1

ChartStyle may override settings for ChartBaseStyle:

Out[1]=1

ChartBaseStyle combines with Style:

Out[1]=1

Style may override settings for ChartBaseStyle:

Out[2]=2

ChartBaseStyle combines with ColorFunction:

Out[1]=1

ColorFunction may override settings for ChartBaseStyle:

Out[2]=2

ChartElementFunction  (6)

Get a list of built-in settings for ChartElementFunction:

Out[1]=1

For detailed settings, use Palettes ChartElementSchemes:

Out[1]=1

This ChartElementFunction is appropriate to show the global scale:

Out[1]=1

Write a custom ChartElementFunction:

Out[2]=2

Use metadata passed on from the input, in this case charting the data:

Out[3]=3

Built-in element functions may have options; use Palettes ChartElementSchemes to set them:

Out[1]=1
Out[2]=2

ChartElements  (9)

Create a pictorial chart based on any Graphics object:

Out[1]=1

Graphics3D:

Out[2]=2

Image:

Out[3]=3

Use a stretched version of the graphic:

Out[1]=1

Use explicit sizes for width and height:

Out[1]=1

Without AspectRatio->Full, the original aspect ratio is preserved:

Out[2]=2

Using All for width or height causes that direction to stretch to the full size of the bar:

Out[1]=1

Use a different graphic for each column of data:

Out[1]=1

Use a different graphic for each row of data:

Out[2]=2

Use a different graphic for each bar pair:

Out[1]=1

Graphics are used cyclically:

Out[1]=1

Styles are inherited from styles set through ChartStyle etc.:

Out[1]=1

Explicit styles set in the graphic will override other style settings:

Out[2]=2

The orientation of the pictorial graphic is unaffected by BarOrigin:

Out[1]=1

ChartLabels  (5)

By default labels are placed in the central axis:

Out[1]=1

Labeled wrappers in data will place additional labels:

Out[2]=2

Use Placed to control label placement:

Out[1]=1

Place labels on each group of bars:

Out[1]=1

Using Placed:

Out[2]=2

Place labels on each bar pair:

Out[1]=1

Specify labels for bars, groups of bars, and bar pairs:

Out[1]=1

ChartLayout  (5)

ChartLayout is grouped by default:

Out[1]=1

Use stacked bars:

Out[1]=1

Use percentile bars:

Out[1]=1

Use stepped bars:

Out[1]=1

Use overlapped bars:

Out[1]=1

ChartLegends  (6)

Generate a legend based on chart style:

Out[1]=1

Use Legended to add additional legend entries:

Out[1]=1

Use Legended to specify individual legend entries:

Out[1]=1

Generate a legend for bar pairs:

Out[1]=1

Create legends for bars and bar pairs:

Out[1]=1

Use Placed to control the placement of legends:

Out[1]=1

ChartStyle  (7)

Use ChartStyle to style bars:

Out[1]=1

Give a list of styles:

Out[1]=1

Use "Gradient" colors from ColorData:

Out[2]=2

Use "Indexed" colors from ColorData:

Out[3]=3

Styles are used cyclically:

Out[1]=1

Style each column of data:

Out[1]=1

Style each row of data:

Out[2]=2

Style each bar pair:

Out[3]=3

Style each side of the pair and both rows and columns of data:

Out[4]=4

With row, column, and pair styles the latter styles may override earlier ones:

Out[5]=5

Style overrides settings for ChartStyle:

Out[1]=1
Out[2]=2
Out[3]=3

ColorFunction overrides settings for ChartStyle:

Out[1]=1
Out[2]=2

ChartElements may override settings for ChartStyle:

Out[1]=1

ColorFunction  (3)

Color by bar height:

Out[1]=1

Use ColorFunctionScaling->False to get unscaled height values:

Out[1]=1

ColorFunction overrides styles in ChartStyle:

Out[1]=1

Use ColorFunction to combine different style effects:

Out[2]=2

ColorFunctionScaling  (2)

By default scaled height values are used:

Out[1]=1

Use ColorFunctionScaling->False to get unscaled height values:

Out[1]=1

Joined  (5)

By default bars are not joined:

Out[1]=1

Join the centers of the tops of the bars:

Out[1]=1

Join the corners of the bars:

Out[2]=2

Join bars with different bar origins:

Out[1]=1

Join groups of bars:

Out[1]=1

Join stacked bars:

Out[1]=1

Join stepped bars:

Out[2]=2

LabelingFunction  (3)

Use automatic labeling by values through Tooltip and StatusArea:

Out[1]=1

Do no labeling:

Out[1]=1

Use the given chart labels as arguments to the labeling function:

Out[1]=1

Place complete labels as tooltips:

Out[2]=2

LabelingSize  (3)

Textual labels are shown at their actual sizes:

Out[1]=1

Image labels are automatically resized:

Out[1]=1

Specify a maximum size for textual labels:

Out[1]=1

Specify a maximum size for image labels:

Out[2]=2

PerformanceGoal  (3)

Generate a paired bar chart with interactive highlighting:

Out[1]=1

Emphasize performance by disabling interactive behaviors:

Out[1]=1

Typically less memory is required for non-interactive charts:

Out[1]=1

PlotTheme  (1)

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

Out[1]=1

Change the color function:

Out[2]=2

Applications  (3)Sample problems that can be solved with this function

Population pyramid of the United States using 2008 data:

Out[2]=2

Population pyramid of the United States showing marital status:

Out[2]=2

Compare import and export values for countries in the G7:

Out[2]=2

Properties & Relations  (3)Properties of the function, and connections to other functions

BarChart plots multiple datasets on a common height axis; PairedBarChart on a categorical axis:

Out[1]=1

PairedHistogram computes heights from arbitrary data:

Out[2]=2

PairedBarChart uses heights directly:

Out[4]=4

PieChart shows multiple datasets in rings:

Out[1]=1

Possible Issues  (1)Common pitfalls and unexpected behavior

PairedBarChart does not accept negative values:

Out[1]=1
Wolfram Research (2010), PairedBarChart, Wolfram Language function, https://reference.wolfram.com/language/ref/PairedBarChart.html (updated 2025).
Wolfram Research (2010), PairedBarChart, Wolfram Language function, https://reference.wolfram.com/language/ref/PairedBarChart.html (updated 2025).

Text

Wolfram Research (2010), PairedBarChart, Wolfram Language function, https://reference.wolfram.com/language/ref/PairedBarChart.html (updated 2025).

Wolfram Research (2010), PairedBarChart, Wolfram Language function, https://reference.wolfram.com/language/ref/PairedBarChart.html (updated 2025).

CMS

Wolfram Language. 2010. "PairedBarChart." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/PairedBarChart.html.

Wolfram Language. 2010. "PairedBarChart." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/PairedBarChart.html.

APA

Wolfram Language. (2010). PairedBarChart. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PairedBarChart.html

Wolfram Language. (2010). PairedBarChart. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PairedBarChart.html

BibTeX

@misc{reference.wolfram_2025_pairedbarchart, author="Wolfram Research", title="{PairedBarChart}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/PairedBarChart.html}", note=[Accessed: 16-April-2025 ]}

@misc{reference.wolfram_2025_pairedbarchart, author="Wolfram Research", title="{PairedBarChart}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/PairedBarChart.html}", note=[Accessed: 16-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_pairedbarchart, organization={Wolfram Research}, title={PairedBarChart}, year={2025}, url={https://reference.wolfram.com/language/ref/PairedBarChart.html}, note=[Accessed: 16-April-2025 ]}

@online{reference.wolfram_2025_pairedbarchart, organization={Wolfram Research}, title={PairedBarChart}, year={2025}, url={https://reference.wolfram.com/language/ref/PairedBarChart.html}, note=[Accessed: 16-April-2025 ]}