Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
Statistics[BarChart] - create bar charts from data
Statistics[ColumnGraph] - create column graphs from data
Calling Sequence
BarChart(X, options, plotoptions)
BarChart['interactive'](X)
ColumnGraph(X, options, plotoptions)
ColumnGraph['interactive'](X)
Parameters
X
-
data
options
(optional) equation(s) of the form option=value where option is one of datasetlabels, color, distance, format, offset, scale, or width; specify options for generating the bar chart
plotoptions
options to be passed to the plots[display] command
Description
The BarChart command generates a bar chart for the specified data. Several formats are available for multiple data sets: default, stacked and percent stacked. See format option below for more information. The ColumnGraph command is similar to BarChart except that numerical values are represented by vertical columns.
The first parameter X is either a single data sample - given as a Vector or list - or a list of data samples. Note, that the individual samples may be of variable size. Alternatively, X can be specified as a list of equations of type value=frequency.
Options
The options argument can contain one or more of the options shown below. All unrecognized options will be passed to the plots[display] command. See plot[options] for details.
datasetlabels=none, relative, absolute, or list
This option controls data set labels on the bars. The relative option will display, for each bar, the relative frequency of the corresponding value. The absolute option will display the absolute frequency of the corresponding value. Finally, one can specify data set labels as a list of strings or expressions.
color=name, list, or range
This option specifies colors for the individual data sets. When a list of colors is given, each of the bars will be colored with the corresponding color in the list. If a range of colors is given, the colors will be generated by selecting an appropriate number of equally-spaced points in the corresponding hue range.
distance=realcons
This option can be used to control the distance between the boxes. The default value is 0.2.
format=default or stacked
By default, individual data sets are clustered together, so that the first cluster contains the first element from each data set, the second cluster contains the second element from each data set, etc. A stacked bar chart shows related data groups, one on top of the other. A percent bar chart is similar to a stacked bar chart, except that it is rescaled to a height of 1 while preserving proportionality. If scale is set to relative and format is set to stacked then a percent stacked plot will be generated.
offset=realcons
Initial offset along the x-axis.
scale=absolute, or relative
This option controls whether the absolute or relative data scale should be used. If scale is set to relative and format is set to default then all data samples will be rescaled so that their range belongs to an interval between -1 and 1. If scale is set to relative and format is set to stacked then a percent stacked plot will be generated.
width=realcons
This option can be used to control the cluster width. The default value is 0.75.
Examples
The commands to create the plots from the Plotting Guide using the data above are
See Also
Array, evalf, seq, Statistics, Statistics[AreaChart], Statistics[LineChart], Statistics[PointPlot], Statistics[Visualization], StringTools[CharacterFrequencies]
Download Help Document