# Tag Info

0

You cannot centre a histogram: the histogram just represents the data. What you can "centre" is the data the histogram is built from. Instead of Histogram[data] use Histogram[data - Mean[data]]

1

When wanting to do costum things with histograms, I find it's often best to use the functions HistogramDistribution and HistogramList. Which give you respectively a distribution object and a list defining the histogram. Below I've shown how i would compare the distributions, note that I'm using a line plot rather than the more appropriate boxchart since it ...

0

I post this as an approach that may assist. Firstly I will assume a finite upper bound, i.e. above this value no observations (just to make finite interval for UniformDistribution). Only OP can make appropriate judgements. int = {{0, 9}, {9, 12}, {12, 16}, {16, 21}, {21, 33}, {33, 50}}; data = {.1, .15, .25, .25, .15, .05}; Note in this case have chosen ...

2

Posting my comments as an answer: Use ScalingFunctions -> "Log". However, as the value of the log-PDF tends to $-\infty$ away from the data, you'll have to set the PlotRange manually to get a reasonable-looking plot. data = RandomVariate[BinormalDistribution[.5], 1000]; SmoothDensityHistogram[data, ScalingFunctions -> "Log", PlotRange -> {-4, ...

2

Alternatively, with d = RandomVariate[NormalDistribution[], 100]; descriptivestatistics[data_] := {Mean[data], Median[data], StandardDeviation[data], Skewness[data], Kurtosis[data]} we construct labels & legend hdr = {"Mean", "Median", "Std. Dev.", "Skewn.", "Kurt"}; tds = ToString@PaddedForm[#, {5, 2}] & /@ descriptivestatistics[d]; ltxt = ...

2

Mathematica's symbolic graphics architecture gives you a lot of flexibility to construct composite graphics. A simple way could be: d = RandomVariate[NormalDistribution[], 100]; descriptivestatistics[data_] := {{"Mean", "Median", "Stdv.", "Skewness", "Kurtosis"}, {Mean[data], Median[data], StandardDeviation[data], Skewness[data], Kurtosis[data]}} // ...

0

Thanks to Jesus from Mathematica, here are two workarounds: data=RandomReal[NormalDistribution[0.5,0.1],{10000,2}]; Show[DensityHistogram[data, Method -> {"DistributionAxes" -> "Histogram"}], PlotRange -> 1] or ReplaceAll[DensityHistogram[data,PlotRange->1,Method->{"DistributionAxes"->"Histogram"}, ...

Top 50 recent answers are included