Index: trunk/MagicSoft/Mars/mhbase/MH3.cc
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 4656)
+++ trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 4828)
@@ -113,5 +113,5 @@
 
     fName  = gsDefName;
-    fTitle = Form(gsDefTitle.Data(), 1);
+    fTitle = Form(gsDefTitle.Data(), fDimension);
 
     if (fHist)
@@ -514,4 +514,61 @@
 */
 
+/*
+void MH3::Paint(Option_t *opt)
+{
+    if (fHist->TestBit(kIsLogx)) pad->SetLogx();
+    if (fHist->TestBit(kIsLogy)) pad->SetLogy();
+    if (fHist->TestBit(kIsLogz)) pad->SetLogz();
+}
+*/
+
+void MH3::Paint(Option_t *o)
+{
+    TString str(o);
+
+    // FIXME: Do it in Paint()
+    if (str.Contains("COL", TString::kIgnoreCase))
+        SetColors();
+
+    if (fHist->TestBit(kIsLogx) && fHist->GetEntries()>0) gPad->SetLogx();
+    if (fHist->TestBit(kIsLogy) && fHist->GetEntries()>0) gPad->SetLogy();
+    if (fHist->TestBit(kIsLogz) && fHist->GetEntries()>0) gPad->SetLogz();
+
+    // Set pretty color palette
+    gStyle->SetPalette(1, 0);
+
+    TVirtualPad *padsave = gPad;
+
+    TProfile* h0;
+    if ((h0 = (TProfile*)gPad->FindObject("_pfx")))
+    {
+        // Get projection for range
+        TProfile *p = ((TH2*)fHist)->ProfileX("_pfx", -1, 9999, "s");
+
+        // Move contents from projection to h3
+        h0->Reset();
+        h0->Add(p);
+        delete p;
+
+        // Set Minimum as minimum value Greater Than 0
+        //h0->SetMinimum(GetMinimumGT(*h0));
+    }
+    if ((h0 = (TProfile*)gPad->FindObject("_pfy")))
+    {
+        // Get projection for range
+        TProfile *p = ((TH2*)fHist)->ProfileY("_pfy", -1, 9999, "s");
+
+        // Move contents from projection to h3
+        h0->Reset();
+        h0->Add(p);
+        delete p;
+
+        // Set Minimum as minimum value Greater Than 0
+        //h0->SetMinimum(GetMinimumGT(*h0));
+    }
+
+    gPad = padsave;
+}
+
 // --------------------------------------------------------------------------
 //
@@ -534,13 +591,7 @@
     pad->SetBorderMode(0);
 
-    AppendPad("");
+    fHist->SetFillStyle(4000);
 
     TString str(opt);
-
-    // FIXME: Do it in Paint()
-    if (str.Contains("COL", TString::kIgnoreCase))
-        SetColors();
-
-    fHist->SetFillStyle(4000);
 
     Bool_t only = str.Contains("ONLY", TString::kIgnoreCase) && fDimension==2;
@@ -565,10 +616,12 @@
     }
 
+    AppendPad("");
+/*
     if (fHist->TestBit(kIsLogx)) pad->SetLogx();
     if (fHist->TestBit(kIsLogy)) pad->SetLogy();
     if (fHist->TestBit(kIsLogz)) pad->SetLogz();
-
-    pad->Modified();
-    pad->Update();
+  */
+    //pad->Modified();
+    //pad->Update();
 }
 
Index: trunk/MagicSoft/Mars/mhbase/MH3.h
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH3.h	(revision 4656)
+++ trunk/MagicSoft/Mars/mhbase/MH3.h	(revision 4828)
@@ -41,4 +41,8 @@
     void SetScaleZ(Double_t scale) { fScale[2] = scale; }
 
+    void SetLogx(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogx) : fHist->ResetBit(kIsLogx); }
+    void SetLogy(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogy) : fHist->ResetBit(kIsLogy); }
+    void SetLogz(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogz) : fHist->ResetBit(kIsLogz); }
+
     Int_t GetDimension() const { return fDimension; }
     Int_t GetNbins() const;
@@ -61,4 +65,5 @@
     void SetColors() const;
     void Draw(Option_t *opt=NULL);
+    void Paint(Option_t *opt="");
 
     MParContainer *New() const;
