MathGroup Archive 2008

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

Search the Archive

Re: Histogram: Show all y-axis labels

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84583] Re: Histogram: Show all y-axis labels
  • From: dennis <dwangsness at earthlink.net>
  • Date: Sat, 5 Jan 2008 04:39:14 -0500 (EST)
  • References: <flk2ld$c37$1@smc.vnet.net>

On Jan 3, 5:37 pm, tomfabtas... at hotmail.com wrote:
> Hi,
>
> I am using version 6.0.1. The below histogram works well, except that
> I want the y-axis labels to extend to 25 (and not stop at 20). I can
> achieve this with other graphs, but the options are slightly different
> with Histogram, so perhaps the order that the options are specified
> isimportant ? Can someone please suggest a solution.
>
> dataMEL = {-4.83862134428094, -4.83351849578614, -4.83123661371209, \
> -4.81857651435823, -4.81697757870106, -3.63077685340039, \
> -3.61990031264591, -3.620454208474, -3.75255271241551, \
> -3.7486505523438, -3.74916778278202, -3.58883703915387, \
> -3.58852150625745, -3.58668274158127, -3.58621380313637, \
> -3.58379329218558, -3.58532018279469, -3.58168270891649, \
> -2.83638122975842, -2.83638122975842, -2.83638122975842, \
> -2.83638122975842, -2.83638122975841, -2.83638122975842, \
> -2.83638122975842, -2.83638122975842, -2.83244782284006, \
> -2.83244782284006, -2.83244782284005, -2.83244782284007, \
> -2.83244782284007, -2.83244782284006, -2.83244782284007, \
> -3.10024726246057, -3.10024726246058, -3.10024726246057, \
> -3.10024726246058, -3.10024726246057, -3.10024726246058, \
> -3.10024726246058, -3.03349306726057, -3.03349306726058, \
> -3.01775973392724, -12.0334297635584, -12.0021027632925, \
> -12.0126901267091, -12.0413883877193, -12.0899536741477, \
> -12.1140833164439, -12.1140833164439, -12.1041896779377, \
> -12.1074037093026, -12.009648655543, -11.9652667636422, \
> -12.0079380870759, -11.5326068667369, -11.5223548336914, \
> -11.0075839226891, -10.9744702929917, -10.9204761885454, \
> -10.9237709504502, -10.7225164034228, -10.7334579272323};
> Needs["Histograms`"]
> Histogram[dataMEL, Frame -> True,
>  HistogramCategories -> Range[-15, 0, 1], HistogramRange -> {-15, 0},
>  FrameTicks -> {{Range[0, 25, 5], None}, {Range[-15, 0], None}},
>  GridLines -> { None, Range[0, 25, 5]}, ImageSize -> {600, 400}]

Hi,

Instead of

Histogram[ your stuff ]

use

Show[Histogram[ your stuff ],PlotRange->{All,{0,25}}]

That works for me.

Dennis


  • Prev by Date: Code or algorithm that selects tickets in turn in Mathematica software.
  • Next by Date: Re: Setting Colours of Plots
  • Previous by thread: Re: Histogram: Show all y-axis labels
  • Next by thread: Re: Histogram: Show all y-axis labels