TGraph *graph = new TGraph(); // create a TGraph object graph->SetHistogram(); // set the histogram flagIn this example, we create a new TGraph object and set the histogram flag using the SetHistogram function. Package library: ROOT (https://root.cern.ch)