User Tools

Site Tools


root:redrawaxis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

root:redrawaxis [2013/08/23 16:55] (current)
nchiap created
Line 1: Line 1:
 +====== Redraw axis to get Ticks on top ======
 +When you draw several histograms on the same pad, later histograms will cover the axis drawn together with the first histogram.
 +To redraw the axis on top, you can use ''​Draw("​axis same"​)'':​
 +
 +<code c++>
 +hist1->​Draw("​Ep"​); ​       // to draw axis-range and label from hist1
 +hist2->​Draw("​hist same"​);​
 +hist1->​Draw("​Ep same"​); ​  // to draw points on top
 +hist1->​Draw("​axis same"​);​ // to redraw axis
 +</​code>​
  
root/redrawaxis.txt ยท Last modified: 2013/08/23 16:55 by nchiap