[OT] Histograms on logarithmic scale (constant bin size on logaritmic scale)

From: Marco Calviani <marco.calviani_at_gmail.com>
Date: Mon, 11 Sep 2006 15:09:26 +0200

Hello ROOTers,

   i'm facing a small issue, not necessarily correlated with ROOT: i want to build an histogram with the energy on the X scale put in logarithmic scale.
I'm building the histogram with the Fill() function. However, since the bin width is constant on the x scale, whenever i'm changing to log x scale lower bins appears larger than bigger bins (obviously). One solution to this problem could be to fill not directly the x axis with Fill(x) but Fill(Log10(x)). This works but the x axis appears with linear labels while it should be logarithmic.

My question is twofold:
1) is it possible to solve this without using Fill(Log10(x))? 2) if it is not the case, how is it possible to change the label of the axis?

Marco Received on Mon Sep 11 2006 - 15:09:36 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET