Dear developers,
The draw options “Y+” and “X+” (either alone or combined) to put the axis ticks and labels on the right and top sides do not seem to work for TMultiGraph, only for TGraph. Small example:
{
auto c0 = new TCanvas("c1","c1",200,10,700,700);
c0->Divide(1,2);
auto mg1 = new TMultiGraph();
auto gr1 = new TGraph(); gr1->SetLineColor(kBlue);
auto gr2 = new TGraph(); gr2->SetLineColor(kRed);
Double_t dx = 6.28/1000;
Double_t x = -3.14;
for (int i=0; i<=1000; i++) {
x = x+dx;
gr1->SetPoint(i,x,2.*TMath::Sin(x));
gr2->SetPoint(i,x,TMath::Cos(x));
}
mg1->Add(gr1);
//mg1->Add(gr2);
c0->cd(1);
gr1->SetTitle("graph with ALX+Y+");
gr1->Draw("alX+Y+");
c0->cd(2);
mg1->SetTitle("multigraph with ALX+Y+");
mg1->Draw("alX+Y+");
}
results in
ROOT Version: 6.26/06, 5.34/38 (all versions?)
Platform: At least Ubuntu 20.04, Ubuntu 22.04, Windows 10