Why isn't my code producing a graph with a log scale in C++?

  • Context: C/C++ 
  • Thread starter Thread starter lavster
  • Start date Start date
  • Tags Tags
    C++ Scale
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 3K views
lavster
Messages
213
Reaction score
0
can someone tell me what is wrong with my code. i get the graph that i want but not with the log scale... i have tried multiple methods. this is the last one i tried (its part of a canvas which is split into quadrants)

TH1F* h3 = (TH1F*) inputfile3 -> Get("pdg");
c->cd(3);
h3->GetXaxis()->SetTitle("pdg code (high)");
h3->Draw();

c->Modified();
c->Update();
c->SetLogy(1);
c->Modified();

and then onto other quadrant...

thanks :)
 
Physics news on Phys.org
sorry i don't quite understand your question (my understanding of comp is very limited). ROOT? and I've called them the histograms from another .C macros thing

thanks
 
ill have a look - cheers!