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
Registration is free. Ask a follow-up in this thread, or start your own.
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
Which library or package are these from? They're not part of the standard C++ language.
 
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
 
I did a Google search for some of the function names. You're using the ROOT package from CERN. They have a whole website about ROOT:

http://root.cern.ch/drupal/

It includes a forum, where you might try asking your question if you can't find your answer in the documentation or a FAQ:

http://root.cern.ch/phpBB3/
 
Last edited:
ill have a look - cheers!