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: [mg93891] Re: [mg93862] Mathematica 7: Histogram Y-axis range?
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Fri, 28 Nov 2008 05:05:37 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200811271031.FAA08747@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

    Options[Histogram][[{44, 45}]]
{PlotRange->Automatic,PlotRangeClipping->False}

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 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: A problem in Pi digits as Lattice space filling
  • Next by Date: Comment display style?
  • Previous by thread: Mathematica 7: Histogram Y-axis range?
  • Next by thread: Re: Mathematica 7: Histogram Y-axis range?