Mathematica 9 is now available
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: [mg93912] Re: Mathematica 7: Histogram Y-axis range?
  • From: "sjoerd.c.devries at gmail.com" <sjoerd.c.devries at gmail.com>
  • Date: Fri, 28 Nov 2008 05:09:26 -0500 (EST)
  • References: <gglsu8$8h5$1@smc.vnet.net>

Have you tried PlotRange->All? It works for me.

Cheers -- Sjoerd

On Nov 27, 12:31 pm, Gordon Robertson <grobert... at bcgsc.ca> 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, a=
s 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 concentrat=
ed
> 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 al=
l
> 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 tha=
t
> was somewhat =less= concentrated near the centre of the histogram. Th=
is
> makes me wonder whether there's some auto-range-clipping that's causing t=
he
> 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 Mathem=
atica 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 Canadawww.bcgsc.ca



  • Prev by Date: Very Long Time
  • Next by Date: Re: Mathematica 7: PieChart: opacity of a sector label?
  • Previous by thread: Re: Mathematica 7: Histogram Y-axis range?
  • Next by thread: Re: Mathematica 7: Histogram Y-axis range?