I have detector data which I want to display with two x-axis, one on the bottom in energy, and one on the top in channels. However, my code seems to not want to do this. Even though I plug in the user coordinates when drawing the axis, it does not appear in the correct position.
So far looking around tutorials and forum questions have not been able to solve my problem, so I made my own post.
Thanks in advance to anyone who might be able to help!
gPad->Update();
TGaxis *axis = new TGaxis(gPad->GetUxmin(), TMath::Power(10, gPad->GetUymax()),
gPad->GetUxmax(), TMath::Power(10, gPad->GetUymax()),beginPoint ,endPoint, 10, "-"); //drawing the Gaxis using the user coordinates
A small follow up question, when I zoom on the x-axis, the top axis does zoom in like the original axis. Is there a way to fix this? (Besides already choosing the right interval in my code).