TGraphPolar - three questions

I’m having a TGraphPolar. There are three things I don’t get managed yet.

  1. How can I assign axis titles?
  2. How can I let the polar axis start at 9 o’ clock instead of 3 o’ clock as in the standard config?
  3. The error bars are somehow not painted correctly. See the plot in the appendix. How can I fix that?

Here’s the relevant excerpt of my source code:

    vector<TGraphPolar*> graphs;
    graphs.push_back(new TGraphPolar());
    graphs.back()->SetPoint(0, 0.0, 0.0);
    TGraphPolargram* polargram = graphs.back()->GetPolargram();
    polargram->SetRangeRadial(0, repetitionTime);
    for (int i=0; i<inputRunNumbers.size(); i++) {
        matrix_double inputIntegrityData; // own typedef, equivalent to vector< vector<double> >
        vector<double> inputSubRunNumbers, inputAzimuthalAngles, inputFlightTimes, inputFlightTimesErr;
        read_ascii_file(filenameIntegrityData, inputIntegrityData); // own ASCII readout routine
        inputSubRunNumbers =;
        inputAzimuthalAngles =;
        inputFlightTimes =;
        inputFlightTimesErr =;
        graphs.push_back(new TGraphPolar());

        for (int j=1; j<inputSubRunNumbers.size(); j++) {
            double tof = fmod(inputFlightTimes[j], repetitionTime);
            if (tof < 0) tof += repetitionTime;
            double x = inputAzimuthalAngles[j];
            graphs.back()->SetPoint(j-1, x/360.0*2*PI, tof);
            graphs.back()->SetPointError(j-1, .0, inputFlightTimesErr[j]);

	polargram = graphs.back()->GetPolargram();

thanks for you input. Can you post a running macro ?
your gives:

Error: Symbol vector<TGraphPolar*>graphs is not defined in current scope  lloyd.C:1:
*** Interpreter error recovered ***

Hey, thanks for trying it out. Problem is, I’m not using a macro but compiled code and I’m using external libraries. I will try to make a working macro as mock-up.

Thanks :slight_smile: