Y correction in a correlation plot

Try:

ch1->Draw(TString::Format("(Y1 - Y2) - (%g / TMath::Sqrt(X)) : 1. / TMath::Sqrt(X)", slope1), "", "colz");