def showFastPhase(self, ppart, kpic): #data is the particle data, ppart. kpic is array of num particles per tile if not self.isGraphing(): return #shape is the bounds of the histogram, [[xmin,xmax], [ymin,ymax]] numPart = np.sum(kpic) #number of particles numTiles = np.size(kpic) #number of tiles xvInTile = np.zeros( (2,numPart), ppart.dtype ) isum = 0 for k, kk in enumerate(kpic): #De-tile particles in to one big fat array xvInTile[0,isum:kk+isum] = ppart[0, 0:kk, k] xvInTile[1,isum:kk+isum] = ppart[1, 0:kk, k] isum += kk H,x,y = np.histogram2d(xvInTile[0],xvInTile[1], bins=40) dv1 = Graphs.DrawFastPhase( x,y,H ) #copy the data self._sendplot(dv1)