Hi,
you could do the following:
import ROOT
canvas = ROOT.TCanvas("canvas","Canvas Title")
canvas.cd()
rootTree.Draw("myBranch>>histo(100.,0.,30.)","anotherBranch==1")
histo=ROOT.gROOT.FindObject("histo")
histo.Draw()
canvas.Update()
canvas.Print("foo.pdf" )