fig0.set_facecolor('w') ax0 = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,1) WIDTH_RIG_PICTURE = .35 ax0.set_position([-.05,.63,WIDTH_RIG_PICTURE+.1,.32]) arenaImg = pylab.imread('rotationArena.png') ax0.imshow(arenaImg) ax0.set_aspect('equal') ax0.set_axis_off() ax1 = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,2) ax1.set_position([.1+WIDTH_RIG_PICTURE,.81,.88-WIDTH_RIG_PICTURE,.16]) flyToPlot = flies['grayFilter'][2].copy() skyToPlot = skies['grayFilter'][2].copy() import plotIndividual reload(plotIndividual) plotIndividual.plotIt(ax1,flyToPlot,skyToPlot,CHANGEBUFFER) ax2 = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,3) ax2.set_position([.1+WIDTH_RIG_PICTURE,.63,.88-WIDTH_RIG_PICTURE,.16]) import plotIndividualCompass reload(plotIndividualCompass) plotIndividualCompass.plotIt(ax2,flyToPlot,skyToPlot,CHANGEBUFFER) import plotOrientationsAfterRotations reload(plotOrientationsAfterRotations) orientationChanges = plotOrientationsAfterRotations.plotIt(flies, skies, fig0, MAX_NUM_STOPS, MAX_TIME_STOPPED, CHANGEBUFFER) axAll = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,24) axAll.set_position([.81,.08,.12,.21]) # boxplots axIndv = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,19) axIndv.set_position([-.03,.0,.95,.28]) # trajectories
#fig0 = pylab.figure(figsize=(18,10)) fig0.set_facecolor('w') ax0 = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,1) ax0.set_position(np.array((0,.8,1,.2))+AXBUFFER) arenaImg = pylab.imread('rotatorArena.png') ax0.imshow(arenaImg) ax0.set_aspect('equal') ax0.set_axis_off() ax1 = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,5) ax1.set_position(np.array((0,.6,1,.2))+AXBUFFER) # plot raw trace: import plotIndividual reload(plotIndividual) plotIndividual.plotIt(ax1,flies,skies,baseDirs) import autocorrelationAnalysis reload(autocorrelationAnalysis) ax2a = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,9) ax2a.set_position(np.array((0,.4,1,.2))+AXBUFFER) ax2b = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,13) ax2b.set_position(np.array((0,.2,1,.2))+AXBUFFER) autocorrelationAnalysis.plotIt(ax2b,ax2a,flies,skies,baseDirs, MAX_NUM_STOPS, MAX_TIME_STOPPED) ax3a = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,17) ax3b = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,18) ax3c = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,19) for axIndex, ax in enumerate([ax3a,ax3b,ax3c]): ax.set_position(np.array((0,0,.25,.2))+AXBUFFER+np.array((axIndex*.3,0,0,0))) ax3boxes = fig0.add_subplot(NUM_SUBPLOT_ROWS,NUM_SUBPLOT_COLS,20)