Commit 430be7a7 authored by Hannah Middleton's avatar Hannah Middleton
Browse files

updating cascade plot

parent 35baf36a
......@@ -21,9 +21,12 @@ def gaussian():
def offset(myFig,myAx,n=1,yOff=60):
dx, dy = 0., yOff/myFig.dpi
print(yOff / myFig.dpi)
return myAx.transData + mpl.transforms.ScaledTranslation(dx,n*dy,myFig.dpi_scale_trans)
#shift = yOff / myFig.dpi
#dx, dy = 0., shift
#print(myFig.dpi,yOff,shift)
shift = 0.0625
dx, dy = 0., shift
return (myAx.transData + mpl.transforms.ScaledTranslation(dx,n*dy,myFig.dpi_scale_trans)), shift
......@@ -80,7 +83,7 @@ def cc(arg):
fig, ax = plt.subplots(figsize=(5,6))
sampling = 5.
noToPlot = 50
noToPlot = 60
thetas= np.arange(0,sampling*noToPlot,sampling)
number = len(thetas)
......@@ -90,7 +93,7 @@ number = len(thetas)
startTime = 1166401536
batchSize = 64*5
batchSize = 64*2
fPlotLow = 59.5
fPlotHigh = 60.5
......@@ -99,7 +102,7 @@ for it, t in enumerate(thetas):
zInd = number - it
trans = offset(fig,ax,it,yOff=sampling)
trans, shift = offset(fig,ax,it,yOff=sampling)
time = startTime+int(it*batchSize)
......@@ -114,11 +117,14 @@ ax.set_xlim(fPlotLow, fPlotHigh)
ax.set_xlabel('Frequency (Hz)')
ax.grid(False)
#ax.set_xlim(59.5,60.5)
ax.set_ylim(-3,noToPlot+15)
ax.set_ylim(-3,max(log10ys)+(noToPlot*shift)+20)
#ax.set_ylim(min(np.log10(ys)),max(np.log10(ys))*noToPlot)
#ax.set_ylim(0.0,1.5)
for side in ["top", "right", "left"]:
ax.spines[side].set_visible(False)
#ax.set_xticks([])
plt.tick_params(axis='x', top='off')
# labelbottom='off', right='off', left='off', labelleft='off')
ax.set_yticks([])
plt.savefig('/home/hannah.middleton/public_html/mainsPower/cascade/cascadeTest.pdf')
......@@ -202,4 +208,5 @@ ax.w_yaxis.set_pane_color((1.0, 1.0, 1.0, 0.0))
ax.w_zaxis.set_pane_color((1.0, 1.0, 1.0, 0.0))
plt.savefig('/home/hannah.middleton/public_html/mainsPower/cascade/cascadeTest.png')
plt.savefig('/home/hannah.middleton/public_html/mainsPower/cascade/cascadeTest.pdf')
plt.show()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment