6 arg1 = (x[0]-par[1])/par[2]
7 arg2 = (0.01*0.39894228)/par[2]
8 arg3 = par[0]/(1+par[3])
10 gauss = arg3*arg2*math.exp(-0.5*arg1*arg1)
16 tpygaus = ROOT.TF1(
'pygaus', pygaus, -4, 4, 4 )
17 tpygaus.SetParameters( 1., 0., 1. )
20 btn = ROOT.BindObject( ROOT.gTQSender, ROOT.TGTextButton )
21 if btn.WidgetId() == 10:
22 global tpygaus, window
26 m = ROOT.TPyDispatcher( MyDraw )
31 ROOT.TGMainFrame.__init__( self, parent, width, height )
33 self.
Canvas = ROOT.TRootEmbeddedCanvas(
'Canvas', self, 200, 200 )
34 self.AddFrame( self.
Canvas, ROOT.TGLayoutHints() )
38 self.DrawButton.Connect(
'Clicked()',
"TPyDispatcher", m,
'Dispatch()' )
39 self.ButtonsFrame.AddFrame( self.
DrawButton, ROOT.TGLayoutHints() )
42 self.ExitButton.SetCommand(
'TPython::Exec( "raise SystemExit" )' )
43 self.ButtonsFrame.AddFrame( self.
ExitButton, ROOT.TGLayoutHints() )
47 self.SetWindowName(
'My first GUI' )
49 self.Resize( self.GetDefaultSize() )
56 if __name__ ==
'__main__':