Custom XAxis on a Multigraph

I’m new here and I’m having some trouble with root for university stuff. I’ve got to draw a graph of Counts vs HV for a drift chamber. I’ve got two vectors, one for high voltage applied and one for the corresponding counts (I have to show the temporal spectrum and compare the experimental one with the theorethical). The problem is that the values shown in the X axis are not the one i used in the vector. Here’s some parts of the code.

[quote]TCanvas*c1=new TCanvas(“c1”, “dN/dt experimentVStheory”, 200, 10, 1200, 800);
TMultiGraph mg = new TMultiGraph();
gr1=new TGraph(n,v,s);

TGraph*gr2=new TGraph(n,v,t);
mg->Add(gr2, "C");

mg->SetTitle("Counts vs HV;HV(V);Counts");

where n is the number of entry in each vector, v is the vector of voltages, s the one of experimental counts and t the one of theorethical. I need the experimantal graph to appear in bars while for the theorethical i need a continuous line.
In the X Axis i would display just the values in v (for example 550, 750 and so on) while the autolabel displays 200-400…

By default the number of divisions along axis is optimised to show “nice” labelling.
You can suppress the optimisation by defining a negative number go divisions:

mg->GetHistogram()->GetXaxis()->SetNdivisions(-510); … 91cbd84084