diff --git a/hist/hist/src/TScatter.cxx b/hist/hist/src/TScatter.cxx index e8f6e9a81ccb6..dfec152176360 100644 --- a/hist/hist/src/TScatter.cxx +++ b/hist/hist/src/TScatter.cxx @@ -157,7 +157,7 @@ TH2F *TScatter::GetHistogram() const { if (!fHistogram) { // do not add the histogram to gDirectory - // use local TDirectory::TContect that will set temporarly gDirectory to a nullptr and + // use local TDirectory::TContext that will set temporarly gDirectory to a nullptr and // will avoid that histogram is added in the global directory TDirectory::TContext ctx(nullptr); double rwxmin, rwymin, rwxmax, rwymax; diff --git a/hist/histpainter/src/TGraphPainter.cxx b/hist/histpainter/src/TGraphPainter.cxx index bab7b44ad63ff..06b0db1a16569 100644 --- a/hist/histpainter/src/TGraphPainter.cxx +++ b/hist/histpainter/src/TGraphPainter.cxx @@ -4474,8 +4474,9 @@ void TGraphPainter::PaintScatter(TScatter *theScatter, Option_t* chopt) } TH2F *h = theScatter->GetHistogram(); + h->SetContour(gStyle->GetNumberOfColors()); // Ensure same number of divisions in underlying hist than in TScatter palette if (optionAxis) { - h->Paint(" "); + h->Paint("COL1"); // avoid h empty bins to be drawn as background if negative Z values in scatter plot if (h->GetMinimum() < h->GetMaximum()) { if (mincGetMinimum()) minc = h->GetMinimum(); if (maxc>h->GetMaximum()) maxc = h->GetMaximum();