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

  • 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

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.


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


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.