SetRangeUser won't work

Hi everyone,

I am plotting 2 graphs combined in a multigraph but the coordinate system needs to be bigger than the two graphs, since I am drawing a couple of markers too. But the range of the x- and y-axis is stubborn and wont accept any changes, so is there a trick? Thx very much

original.c (10.7 KB)
20000_stats.txt (42 Bytes)
Fil_ExtraHigh.txt (78 Bytes)
Fil_High.txt (80 Bytes)
Fil_Low.txt (80 Bytes)
Fil_Medium .txt (80 Bytes)
Coil_ExtraHigh.txt (78 Bytes)
Coil_High.txt (66 Bytes)
Coil_Medium.txt (58 Bytes)
Fil_Medium-.txt (81 Bytes)
Fil_ExtraLow.txt (79 Bytes)
Coil_Low.txt (78 Bytes)


ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


auto g = new TMultiGraph();
g->Add(GMeanCoil);
g->Add(GMeanFil);

g->Draw("APL");

g->SetTitle("Optimization with 20 000 Samples");
g->GetHistogram()->SetMinimum(Min-margin);
g->GetHistogram()->SetMaximum(Max+margin);
g->GetXaxis()->SetLimits(2.0-margin,XCoil[3]+margin);

1 Like

Perfekt :slight_smile: This did exactly what I wanted. But I forgot to ask another thing. The Title of my X-axis is sadly not visible. It seems that the canvas ends there, so how can I enlarge it?

Cheers

TCanvas* c = new TCanvas("c","c",1000,700);
c->SetBottomMargin(0.16);
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.