Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2244)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2245)
@@ -23,4 +23,7 @@
    * mhist/MHPixVsTime.[h,cc]:
      - added
+
+   * mhist/MHCamera.cc:
+     - changed output of labels for color axis
 
 
Index: /trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2244)
+++ /trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2245)
@@ -881,5 +881,5 @@
 //  Change the text on the legend according to the range of the Display
 //
-void MHCamera::UpdateLegend(Float_t minphe, Float_t maxphe, Bool_t islog)
+void MHCamera::UpdateLegend(Float_t min, Float_t max, Bool_t islog)
 {
     const Float_t range = fGeomCam->GetMaxRadius();
@@ -900,15 +900,18 @@
 #endif
 
+    const Float_t step   = (islog && min>0 ? log10(max/min) : max-min) / kItemsLegend;
+    const Int_t   firsts = step*3 < 1e-8 ? 8 : (Int_t)floor(log10(step*3));
+    const TString opt    = Form("%%.%if", firsts>0 ? 0 : abs(firsts));
+
     for (Int_t i=0; i<kItemsLegend+1; i+=3)
     {
-        const Float_t pos = (Float_t)i/kItemsLegend;
-
         Float_t val;
-        if (islog && minphe>0)
-            val = pow(10, log10(maxphe/minphe)*pos) * minphe;
+        if (islog && min>0)
+            val = pow(10, step*i) * min;
         else
-            val = minphe + pos * (maxphe-minphe);
-
-        newtxt.PaintText(range+1.5*w, H*(i*h-1)-offset, Form(val<1e6?"%5.1f":"%5.1e", val));
+            val = min + step*i;
+
+        //const bool dispexp = max-min>1.5 && fabs(val)>0.1 && fabs(val)<1e6;
+        newtxt.PaintText(range+1.5*w, H*(i*h-1)-offset, Form(opt, val));
     }
 
