Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: PlotRange with Histogram Log height
Replies: 3   Last Post: Nov 6, 2013 12:23 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jeff

Posts: 5
Registered: 12/3/09
Re: PlotRange with Histogram Log height
Posted: Nov 6, 2013 12:23 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


Thanks. That did the trick.

On Tue, Nov 5, 2013, at 8:57 AM, Bob Hanlon <hanlonr357@gmail.com> wrote:

> You must take the Log of the vertical axis range values
>
> data = RandomVariate[
> TruncatedDistribution[{-2, 2},
> NormalDistribution[0, 0.5]], 1000];
>
> Histogram[data, 10, {"Log", "PDF"},
> PlotRange -> {{-2, 2}, Automatic},
> Frame -> True,
> PlotRangeClipping -> True]
>
> Histogram[data, 10, {"Log", "PDF"},
> PlotRange -> {{-2, 2}, Log /@ {0.01, 1.0}},
> Frame -> True,
> PlotRangeClipping -> True]
>
> However, since Log is Listable, this can be shortened slightly to
>
> Attributes[Log]
>
> {Listable, NumericFunction, Protected}
>
> Histogram[data, 10, {"Log", "PDF"},
> PlotRange -> {{-2, 2}, Log@{0.01, 1.0}},
> Frame -> True,
> PlotRangeClipping -> True]
>
>
> Bob Hanlon
>
>
>
> On Mon, Nov 4, 2013 at 11:18 PM, Jeff <jbwjbwjbw@gmail.com> wrote:
> I am trying to draw a histogram with log heights with a specified PlotRange. This command works fine:
>
> Histogram[data, 10, {"Log", "PDF"},
> PlotRange -> {{-2, 2}, Automatic}, Frame -> True,
> PlotRangeClipping -> True]
>
> But what I need is the ability to control the range of the vertical axes. When I change the "Automatic" to something specific I get a blank graph. For example, this fails
>
> Histogram[data, 10, {"Log", "PDF"},
> PlotRange -> {{-2, 2}, {0.01, 1.0}}, Frame -> True,
> PlotRangeClipping -> True]
>
> I am using Mathematica 9.0.1.0 on OSX 10.8.5. Any help would be appreciated.
>
>







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.