TGraph* graph = new TGraph(10, x, y); graph->SetLineWidth(2);
TGraph* graph = new TGraph(10, x, y); graph->SetLineWidth(2); // ... some code ... graph->SetLineWidth(4);This example creates a TGraph object with 10 points, sets the line width to 2 pixels, does some other operations that are not shown, and then changes the line width of the graph to 4 pixels. Package/library: The TGraph class is part of the ROOT package/library, which is a data analysis framework used in high-energy physics. It provides a set of C++ classes and a graphical user interface called the ROOT system.