Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mathematica 7: Histogram Y-axis range?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93905] Re: Mathematica 7: Histogram Y-axis range?
  • From: Oliver Ruebenkoenig <ruebenko at uni-freiburg.de>
  • Date: Fri, 28 Nov 2008 05:08:10 -0500 (EST)
  • References: <gglsu8$8h5$1@smc.vnet.net>

On Thu, 27 Nov 2008, Gordon Robertson wrote:

> I've corrected and adjusted the text below.
>
> G
>
> --
> I'm using Mathematica 7 on an Intel Mac with OSX 10.5.5. L3111-1191.
>
> I'm finding unexpected behaviour in Mathemaitca 7's Histogram function, as I try to
> generate a histogram that worked routinely in Mathematica 6, many times, over the
> past few months.
>
> I have a list of ~2400 real numbers ('mCtrs') whose values are concentrated
> in a range that will be near the centre of the Histogram's X-axis. I
> generate a histogram with this:
>
> plusMinus = 200;
> hDtoC = Histogram[mCtrs, {-plusMinus, plusMinus, 10}]
>
> Unexpectedly, the Y-axis terminates at ~90, and the pale blue bars at the
> centre of the histogram extend above this upper limit, which is not at all
> presentable. For such a plot, Mathematica 6 automatically extended the Y-axis to
> include the bars fully. Looking at the Help documentation, I do not see a
> switch that would let me ask to see 'All' of the histogram's Y-range.
>
> An hour ago, the same code gave a correct histogram for an input list that
> was somewhat =less= concentrated near the centre of the histogram. This
> makes me wonder whether there's some auto-range-clipping that's causing the
> problem. But the test case below makes me doubt this.
>
> --
> If I test the 2400 input values, they are 'numbers', as expected:
> tnq = Table[NumberQ[motifCtrs[[i]]], {i, Length[motifCtrs]}];
>
> Tally[tnq]
> {{True, 2394}}
>
> --
> If I generate a test case, with highly concentrated central values, I see
> the full range of bar heights is displayed, as expected (and as in Mathematica 6):
> testCtrs = RandomReal[{-5, 5}, 10000];
> testCtrs1 = Flatten[Prepend[testCtrs, {-100, 100}]];
>
> Histogram[testCtrs1, {-plusMinus, plusMinus, 10}]
>
> G
> -- 
> Gordon Robertson
> Gene Regulation Informatics
> Canada's Michael Smith Genome Sciences Centre
> Vancouver BC Canada
> www.bcgsc.ca
>
>
>
>


Gordon,

does PlotRange -> All help?

data = Join[RandomReal[NormalDistribution[0, 50], {1000}],
    Table[0, {200}]];

plusMinus = 200;
hDtoC = Histogram[data, {-plusMinus, plusMinus, 10}, PlotRange -> All]


Oliver


  • Prev by Date: Re: Mathematica 7: PieChart: opacity of a sector label?
  • Next by Date: Re: Version 7 Cursor for Locators
  • Previous by thread: Re: Mathematica 7: Histogram Y-axis range?
  • Next by thread: Re: Numerical General Relativity packages