Hi,
I would like to draw a TGraph with reverse X axis, and the Y axis is on the right hand side, but it seems that these 2 options doesn’t work together
here is my code:
#include <stdio.h>
void CodeCpp_TestReverseX()
{
auto c4 = new TCanvas("c4","c4",200,10,600,400);
double x[] = {0, 1, 2, 3, 4};
double y[] = {0, 2, 4, 1, 3};
double ex[] = {0.1, 0.2, 0.3, 0.4, 0.5};
double ey[] = {1, 0.5, 1, 0.5, 1};
TGraphErrors* ge = new TGraphErrors(5, x, y, ex, ey);
ge -> GetYaxis() -> SetTitle("haha");
ge->Draw("ay+rx");
c4 -> SaveAs ("/home/longhoa/ROOT_Work/Task_Test/File_Plot/plotTestREverseX.png");
}
And the result plot still have the Y axis on the left
Is there any thing I miss, or is there any workaround?
Thank you very much.
Hoa.
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided