Polar Graphs

With ROOT you can profit from rather advanced plotting routines, like the ones implemented in the TPolarGraph, a class to draw graphs in polar coordinates. You can see the example macro in the following and the resulting Figure is 4.2:

// Builds a polar graph in a square Canvas.

void macro3(){
    auto c = new TCanvas("myCanvas","myCanvas",600,600);
    Double_t rmin=0.;
    Double_t rmax=TMath::Pi()*6.;
    const Int_t npoints=1000;
    Double_t r[npoints];
    Double_t theta[npoints];
    for (Int_t ipt = 0; ipt < npoints; ipt++) {
        r[ipt] = ipt*(rmax-rmin)/npoints+rmin;
        theta[ipt] = TMath::Sin(r[ipt]);
    TGraphPolar grP1 (npoints,r,theta);
    grP1.SetTitle("A Fan");

A new element was added on line 4, the size of the canvas: it is sometimes optically better to show plots in specific canvas sizes.

The graph of a fan obtained with ROOT.