Commit 4ba8ee8e authored by Kennedy, Joseph H's avatar Kennedy, Joseph H
Browse files

Better plot layout

fixes #2
parent aa7d5ec0
......@@ -114,7 +114,8 @@ def main(args):
hist1.set_ylabel('Cell frequency')
hist1.set_xlim(-400,400)
hist1.axvline(x=0.0,c="lightskyblue",linewidth=2)
plt.tight_layout()
img_file = os.path.join(args.out, 'IB_diffhist_all.png')
plt.savefig(img_file)
plt.close()
......
......@@ -54,7 +54,8 @@ def main(args):
testplot.set_xlim(-200,1200)
testplot.plot([0, 1], [0, 1], transform=testplot.transAxes,zorder=0)
testplot.set_title('Accumulation')
plt.tight_layout()
img_file = os.path.join(args.out, 'IB_AccCompare.png')
plt.savefig(img_file)
plt.close()
......
......@@ -82,6 +82,7 @@ def main(args):
cbar = m.colorbar(obs, location='bottom', pad="5%")
cbar.set_label('Surface mass balance (kg m$^-2$ a$^{-1}$)')
plt.tight_layout()
img_file = os.path.join(args.out, 'IB_spatial.png')
plt.savefig(img_file)
plt.close()
......@@ -117,6 +118,7 @@ def main(args):
cbar = m.colorbar(obs, location='bottom', pad="5%")
cbar.set_label('Difference in surface mass balance \n (Model - IceBridge) (kg m$^-2$ a$^{-1}$)')
plt.tight_layout()
img_file = os.path.join(args.out, 'IB_spatial_difference.png')
plt.savefig(img_file)
plt.close()
......
......@@ -109,6 +109,7 @@ def main(args):
hist1.set_xlim(-4000,4000)
hist1.axvline(x=0.0,c="lightskyblue",linewidth=2)
plt.tight_layout()
img_file = os.path.join(args.out, 'core_diffhist_all.png')
plt.savefig(img_file)
plt.close()
......
......@@ -85,6 +85,7 @@ def main(args):
obs = m.scatter(xobs,yobs,c=smbobs,marker='o',edgecolor='black',
cmap='Spectral',zorder=3,vmin=-1500,vmax=1500)
plt.tight_layout()
img_file = os.path.join(args.out, 'core_spatial.png')
plt.savefig(img_file)
plt.close()
......
......@@ -91,6 +91,7 @@ def main(args):
testplot.axhline(y=0.0,c="darkgrey",linewidth=1,zorder=0)
testplot.set_ylim(-5500,1500)
plt.tight_layout()
img_file = os.path.join(args.out, 'core_smbelev_obs.png')
plt.savefig(img_file)
plt.close()
......@@ -110,6 +111,7 @@ def main(args):
testplot2.axhline(y=0.0,c="darkgrey",linewidth=1,zorder=0)
testplot2.set_ylim(-5500, 1500)
plt.tight_layout()
img_file = os.path.join(args.out, 'core_smbelev_mod.png')
plt.savefig(img_file)
plt.close()
......@@ -148,6 +150,7 @@ def main(args):
glacplot.set_xlabel(' ')
glacplot.set_title(glac_longnames[i],size=12)
plt.tight_layout()
img_file = os.path.join(args.out, 'core_transects.png')
plt.savefig(img_file)
plt.close()
......@@ -174,6 +177,7 @@ def main(args):
testplot.plot([0, 1], [0, 1], transform=testplot.transAxes,zorder=0)
testplot.set_title('Accumulation')
plt.tight_layout()
img_file = os.path.join(args.out, 'core_AccCompare.png')
plt.savefig(img_file)
plt.close()
......@@ -196,6 +200,7 @@ def main(args):
testplot.plot([0, 1], [0, 1], transform=testplot.transAxes,zorder=0)
testplot.set_title('Ablation')
plt.tight_layout()
img_file = os.path.join(args.out, 'core_AblCompare.png')
plt.savefig(img_file)
plt.close()
......
......@@ -135,6 +135,7 @@ def main(args):
xobs, yobs = m(lon_obs,lat_obs)
obs3 = m.scatter(xobs,yobs,marker='o',lw=0,zorder=3,s=3,color='white')
plt.tight_layout()
img_file = os.path.join(args.out, 'plot_meta.png')
plt.savefig(img_file)
plt.close()
......
Supports Markdown
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