RectangleChart

RectangleChart[{{x1,y1},{x2,y2},}]

makes a rectangle chart with bars of width xi and height yi.

RectangleChart[{,wi[{xi,yi},],,wj[{xi,yj},],}]

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

RectangleChart[{data1,data2,}]

makes a rectangle chart from multiple datasets datai.

Details and Options

Examples

open allclose all

Basic Examples  (4)

Generate a rectangle chart for a list of width and height pairs:

Multiple datasets:

Show multiple sets as a row of charts:

Use categorical labels:

Categorical legends:

Set the style for bars:

Pictorial bars:

Procedural bars:

Scope  (40)

Data and Layouts  (13)

Items in a dataset are grouped together:

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

Non-real data is taken to be missing:

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 dimensions of the bars:

Use the keys as labels:

Use the keys as callouts:

Use the keys as legends:

Associations can be nested:

The weights in WeightedData are ignored:

Use different layouts to display multiple datasets:

Use a row of sector charts:

Use a column of sector charts:

Multiple rows or columns:

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

Use an explicit list of styles for the bars:

Use any gradient or indexed color schemes from ColorData:

Use color schemes designed for charting:

Alter the appearance of charts with built-in themes:

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 a high-contrast color scheme and edge-fading rectangles:

Labeling and Legending  (13)

Use Labeled to add a label to a bar:

Use symbolic positions for label placement:

Provide categorical labels for the columns of data:

For rows of data:

For both:

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

Use Callout to add a label to a bar:

Change the appearance of the callout:

Automatically position callouts:

Provide value labels for bars by using LabelingFunction:

Use Placed to control placement and formatting:

Generate callouts from the data:

Add categorical legend entries for the columns of data:

For rows of data:

Use Legended to add additional legend entries:

Use Placed to affect the positioning of legends:

Options  (89)

AspectRatio  (4)

By default, RectangleChart uses a fixed height-to-width ratio for the plot:

Make the height the same as the width with AspectRatio1:

AspectRatioAutomatic determines the ratio from the data:

AspectRatioFull adjusts the height and width to fit tightly inside other constructs:

Axes  (3)

By default, axes are drawn:

Use AxesFalse to turn off axes:

Turn each axis on individually:

AxesStyle  (4)

Change the style for the axes:

Specify the style of each axis:

Use different styles for the ticks and the axes:

Use different styles for the labels and the axes:

BarOrigin  (1)

Change the bar origin:

BarSpacing  (5)

Use automatically determined spacing between bars:

Use no spacing:

Use symbolic presets:

Use explicit spacing between bars:

Use explicit spacing between bars and groups of bars:

ChartBaseStyle  (5)

Use ChartBaseStyle to style all 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:

ChartElementFunction  (5)

Get a list of built-in settings for ChartElementFunction:

For detailed settings use Palettes ChartElementSchemes:

Here is a ChartElementFunction appropriate to show the global scale:

Write a custom ChartElementFunction:

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

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:

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:

Create true 3D shaded bars:

ChartLabels  (8)

By default, labels are placed in the axis:

Labeled wrappers in data will place additional labels:

Use Placed to control label placement:

Positions outside the bar:

Coordinate-based placement relative to a bar:

Place all labels at the upper-right corner and vary the coordinates within the label:

Use the third argument to Placed to control formatting:

Use a hyperlink label:

Rotate the labels:

By default, labels are associated with columns of data:

Associate labels with rows or datasets:

Label both rows and columns:

Use Placed to affect placements:

Use Callout to connect the labels to the bars:

Place multiple labels:

ChartLayout  (3)

ChartLayout is grouped by default:

Use stepped bars:

Place each of the sectors in a separate panel using shared scales:

Use a row instead of a column:

Use multiple columns or rows:

Prefer full columns or rows:

ChartLegends  (4)

Generate a legend based on chart style:

Use Legended to add additional legend entries:

Or to specify individual legend entries:

Generate a legend for datasets:

Unused legend labels are dropped:

Legends can be applied to several dimensions:

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 both rows and columns of data:

With both row and column styles, the last style may override earlier ones:

Style overrides settings for ChartStyle:

ColorFunction overrides settings for ChartStyle:

ChartElements with explicit style settings override settings for ChartStyle:

ColorFunction  (4)

Color by bar height:

Use ColorFunctionScaling->False to get unscaled height values:

Color by area:

ColorFunction overrides styles in ChartStyle:

Use ColorFunction to combine different style effects:

ColorFunctionScaling  (2)

Use ColorFunctionScaling->False to get unscaled height values:

Color by area:

ImageSize  (7)

Use named sizes, such as Tiny, Small, Medium and Large:

Specify the width of the plot:

Specify the height of the plot:

Allow the width and height to be up to a certain size:

Specify the width and height for a graphic, padding with space if necessary:

Setting AspectRatioFull will fill the available space:

Use maximum sizes for the width and height:

Use ImageSizeFull to fill the available space in an object:

Specify the image size as a fraction of the available space:

LabelingFunction  (8)

Use automatic labeling by values through Tooltip and StatusArea:

Do no labeling:

Use Placed to control label placement:

Symbolic positions outside the bar:

Coordinate-based placement relative to a bar:

Use Callout to place labels automatically:

Use symbolic positions to place Callout labels:

Control the formatting of labels:

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

Place complete labels as tooltips:

LabelingSize  (4)

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:

Show image labels at their natural sizes:

PerformanceGoal  (3)

Generate a 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 detailed frame ticks and grid lines:

Turn off the grid lines:

TargetUnits  (2)

Units are automatically detected:

Specify the units to show in each direction:

Applications  (12)

Move the slider to see how the left Riemann sum of in [0,π] approaches :

Create an overlapped proportional area chart:

Create a rectangle chart of the atomic weight and abundance of elements in the Earth's crust:

Mouse over the bars to get the element names:

Compare sales and profitability:

Label the exact values on the axis:

Click the bars to hear the name of the country, its GDP per capita, and population:

Create a rectangle chart of average hourly earnings of persons employed on works projects:

Create a chart of the proportion of the working population covered by insurance:

Visualize units sold and where they were sold:

Compare GDP per capita to population among a list of European countries:

Mouse over the rectangles to get a summary for each country:

Mouse over the rectangles to get a summary for each country:

Visually screen companies by comparing earnings and PE ratios:

Define a labeling function to place company information in a tooltip:

Mouse over the bars to get company information:

Create bar codes:

Properties & Relations  (4)

Use RectangleChart3D to get a 3D rendering of a RectangleChart:

BarChart is a special case of RectangleChart:

Use SectorChart to visualize a list of data as sectors:

Use Histogram3D to automatically compute binning and draw histograms:

Neat Examples  (1)

Chartwork:

Wolfram Research (2008), RectangleChart, Wolfram Language function, https://reference.wolfram.com/language/ref/RectangleChart.html (updated 2021).

Text

Wolfram Research (2008), RectangleChart, Wolfram Language function, https://reference.wolfram.com/language/ref/RectangleChart.html (updated 2021).

CMS

Wolfram Language. 2008. "RectangleChart." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/RectangleChart.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_rectanglechart, author="Wolfram Research", title="{RectangleChart}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/RectangleChart.html}", note=[Accessed: 07-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_rectanglechart, organization={Wolfram Research}, title={RectangleChart}, year={2021}, url={https://reference.wolfram.com/language/ref/RectangleChart.html}, note=[Accessed: 07-November-2024 ]}