Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16176
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: PlotRange with Histogram Log height |
| Date | 2013-11-06 05:22 +0000 |
| Message-ID | <l5cjm4$4qe$1@smc.vnet.net> (permalink) |
| References | <20131105041819.81A3C6A1C@smc.vnet.net> |
| Organization | Time-Warner Telecom |
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.
>
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: PlotRange with Histogram Log height Bob Hanlon <hanlonr357@gmail.com> - 2013-11-06 05:22 +0000
csiph-web