Example 2: Changing line stylesc++
Example 3: Modifying font sizec++ TCanvas* canvas = new TCanvas("canvas", "Canvas", 800, 600); canvas->cd(); TH1F* hist = new TH1F("hist", "Histogram", 100, 0, 1); hist->FillRandom("gaus", 10000); hist->GetXaxis()->SetTitleSize(0.05); // change the font size of the x-axis title hist->GetYaxis()->SetLabelSize(0.03); // change the font size of the y-axis labels hist->Draw(); // plot the histogram canvas->Modified(); // apply the modifications ``` In these examples, we are using ROOT's TCanvas Modified class to modify the appearance of the canvas and the plots. We can see how easy it is to customize the properties of the canvas and its components using TCanvas Modified.