How to creat a log Histogram

Hi
I just want creat to a log histogram.
However, when I make the following modification using the B4 example, it does not create the histogram.
from

analysisManager->CreateH1("Eabs","Edep in absorber", 10, 0., 800*MeV);

to

analysisManager->CreateH1("Eabs","Edep in absorber", 10, 0., 800*MeV,"MeV","none","log");

Hello,

After your change, you should see a warning:

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
      issued by : G4Analysis::CheckDimension
Illegal value of x (min = 0) with logarithmic function or binning
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

When choosing a logarithmic binning, you have to provide min, max values that log10 function can be applied on, and so change min = 0. to eg. 1.e-05 or other value of low order of magnitude, according to your use case.

Best regards,