def make_density_plot(): a = numpy.reshape(numpy.arange(90.0), (5, 6, 3)) a[..., 1] = 100 - a[..., 1] d = biggles.Density(1 - (a / numpy.max(a)), [[0, 0], [5, 10]]) # make plot p = biggles.FramedPlot() p.title = "Density" p.add(d) return p
tmp[i,j,0] = tmp[i,j,1] = tmp[i,j,2] = (a[i,j]-low)/(high-low) # if 19 < i < 35 and 15 < j < 21: # tmp[i,j,0] = 1. # tmp[i,j,1] = 0. # tmp[i,j,2] = 0. # if 75 < i < 82 and 37 < j < 41: # tmp[i,j,0] = 1. # tmp[i,j,1] = 0. # tmp[i,j,2] = 0. # if 75 < i < 82 and 58 < j < 62: # tmp[i,j,0] = 1. # tmp[i,j,1] = 0. # tmp[i,j,2] = 0. return tmp p = biggles.FramedPlot() p.add(biggles.Density(look(allfrac,0.95,1.), ((0, 1.25*math.pi), (1, 0.25*math.pi)))) # p.add(biggles.DataLabel(0.28, 3, "A")) # p.add(biggles.DataLabel(0.79, 1.99, "B")) # p.add(biggles.DataLabel(0.79, 0.95, "C")) p.x1.label = r"|cos$\theta$| of tracks" p.y1.label = r"$\phi$ of TRACKS (180$\degree$ range)" p.title = r"BarrelBhabha trigger $\epsilon$ from bhabhas (95%-100%)" p.xrange = (0.,1.) p.yrange = (0.25*math.pi-0.2, 1.25*math.pi+0.2) p.show() p.write_eps("plottrig2_1.eps") # tr1phi = -math.pi / 2. # tr2phi = tr1phi + math.pi # thefunc = lambda x: (64./2./math.pi*(math.atan2(math.cos(x+(x+math.pi)),math.sin(x+(x+math.pi)))+math.pi)) # p = h1(100,0.*math.pi,1.5*math.pi,func=thefunc).plot(False, lines=True)