2
$\begingroup$

Histogram[data,"Log"] will generate an histogram with a log scale on the x axis, but I need a LogLog scale, is it possible?

$\endgroup$
  • 2
    $\begingroup$ Naively, I would just take the log of the y-values before you make the histogram. $\endgroup$ – march Oct 11 '18 at 19:45
4
$\begingroup$

You can use the form Histogram[data, {"Log", bspec}, {"Log", hspec}], where {"Log", bspec} applies binning bspec on log-transformed data, and {"Log", hspec} gives log-transformed height specification.

Example:

SeedRandom[1]
data = RandomVariate[LogNormalDistribution[10, 1], 1000];

Histogram[data,{"Log", 10}, {"Log", "Count"}]

enter image description here

Compare with

Histogram[data, 10, "Count"]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.