|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
PairedHistogram
PairedHistogram[{x1, x2, ...}, {y1, y2, ...}]
plots a paired histogram of the values
and
.
PairedHistogram[{x1, x2, ...}, {y1, y2, ...}, bspec]
plots a paired histogram with bin width specification bspec.
PairedHistogram[{x1, x2, ...}, {y1, y2, ...}, bspec, hspec]
plots a paired histogram with bin heights computed according to the specification hspec.
PairedHistogram[{data11, ...}, {data21, ...}, ...]
plots a paired histograms for multiple datasets
and
.
Details and OptionsDetails and Options
- PairedHistogram[data1, data2] by default plots a paired histogram with equal bin widths chosen to approximate an assumed underlying smooth distribution of the values
and
. - The following bin width specifications bspec can be given:
-
n use n bins {dx} use bins of width dx {xmin,xmax,dx} use bins of width dx from
to 
{{b1,b2,...}} use the bins 
Automatic determine bin widths automatically "name" use a named binning method {"Log",bspec} apply binning bspec on log transformed data fb apply fb to get an explicit bin specification 
- The binning specification
is taken to use the Automatic underlying binning method. - Possible named binning methods include:
-
"Sturges" compute the number of bins based on the length of data "Scott" asymptotically minimize the mean square error "FreedmanDiaconis" twice the interquartile range divided by the cube root of sample size "Knuth" balance likelihood and prior probability of a piecewise uniform model "Wand" one-level recursive approximate Wand binning - The function fb in PairedHistogram[data1, data2, fb] is applied to a list of all
and
and should return an explicit bin list
. - Different forms of histogram can be obtained by giving different bin height specifications hspec in PairedHistogram[data1, data2, bspec, hspec]. The following forms can be used:
-
"Count" the number of values lying in each bin "CumulativeCount" cumulative counts "SurvivalCount" survival counts "Probability" fraction of values lying in each bin "PDF" probability density function "CDF" cumulative distribution function "SF" survival function "HF" hazard function "CHF" cumulative hazard function {"Log",hspec} log transformed height specification fh heights obtained by applying fh to bins and counts - The function fh in PairedHistogram[data1, data2, bspec, fh] is applied to two arguments: a list of bins
and corresponding list of counts
. The function should return a list of heights to be used for each of the
. - Only values
that are real numbers are assigned to bins; others are taken to be missing. - In PairedHistogram[{data11, ...}, {data21, ...}, ...], automatic bin locations are determined by combining all the datasets
and
. - PairedHistogram[{..., wi[datai, ...], ...}, {..., wj[dataj], ...}, ...] renders the histogram elements associated with dataset
according to the specification defined by the symbolic wrapper
. - Possible symbolic wrappers are the same as for BarChart and include Style, Labeled, Legended, etc.
- PairedHistogram has the same options as Graphics, with the following additions and changes:
-
AspectRatio 1/GoldenRatio overall ratio of width to height Axes True whether to draw axes BarOrigin Bottom origin of histogram bars ChartBaseStyle Automatic overall style for bars ChartElementFunction Automatic how to generate raw graphics for bars ChartElements Automatic graphics to use in each of the bars ChartLabels None category labels for datasets ChartLayout Automatic overall layout to use ChartStyle Automatic style for bars ChartLegends None legends for data elements and datasets ColorFunction Automatic how to color bars ColorFunctionScaling True whether to normalize arguments to ColorFunction LabelingFunction Automatic how to label elements LegendAppearance Automatic overall appearance of legends PerformanceGoal $PerformanceGoal aspects of performance to try to optimize ScalingFunctions None how to scale individual coordinates - Possible settings for ChartLayout include
and
. - The arguments supplied to ChartElementFunction are the bin region
, the bin values lists, and metadata
from each level in a nested list of datasets. - A list of built-in settings for ChartElementFunction can be obtained from
. - The argument supplied to ColorFunction is the height for each bin.
- With ScalingFunctions->{sx, sy}, the x coordinate is scaled using
etc. - Style and other specifications from options and other constructs in BarChart are effectively applied in the order ChartStyle, ColorFunction, Style and other wrappers, ChartElements, and ChartElementFunction, with later specifications overriding earlier ones.
ExamplesExamplesopen allclose all
Basic Examples (2)Basic Examples (2)
New in 8
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »






