18c1 = ROOT.TCanvas(
"c1",
"Two simple graphs", 200, 10, 700, 500)
27x = np.linspace(0, n - 1, n)
28y = 10 * np.sin(x + 0.2)
30gr1 = ROOT.TGraph(n, x, y)
38gr1.SetTitle(
"Graph from available data")
39gr1.GetXaxis().SetTitle(
"X title")
40gr1.GetYaxis().SetTitle(
"Y title")
58with open(f
"{ROOT.gROOT.GetTutorialDir()}/visualisation/graphs/data_basic.txt")
as file:
60 w_str, z_str = re.split(
r"\s+", line)[:2]
61 w = np.append(w, float(w_str))
62 z = np.append(z, float(z_str))
66gr2 = ROOT.TGraph(m, w, z)
71gr2.SetTitle(
"Graph from data file")
72gr2.GetXaxis().SetTitle(
"W title")
73gr2.GetYaxis().SetTitle(
"Z title")
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len