Skip to content

Commit

Permalink
Fixed output filename. Text alignment different between matplotlib ve…
Browse files Browse the repository at this point in the history
…rsions. :-(
  • Loading branch information
scottransom committed Nov 18, 2019
1 parent 22bc703 commit 05a9267
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examplescripts/ppdot_plane_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@
x = pu.pdot_from_B(y, 10.0**logB)
elif logB==8:
x = 0.05
y = 1.1 * pu.pdot_from_B(x, 10.0**logB)
y = pu.pdot_from_B(x, 10.0**logB)
else:
x = 1.1 * plims[0]
y = 1.1 * pu.pdot_from_B(x, 10.0**logB)
y = pu.pdot_from_B(x, 10.0**logB)
plt.text(x, y, "$10^{%d}$ G"%logB, color=greytext,
horizontalalignment='left', verticalalignment='baseline',
rotation=np.degrees(np.arctan(-1.0 * dpdpd)))

# Plot Edot lines
Expand All @@ -111,6 +112,7 @@
y = 1e-21
x = 0.6 * (y * 4e45 * np.pi * np.pi / 10.0**logEdot)**(1.0/3.0)
plt.text(x, y, "$10^{%d}$ erg/s"%logEdot, color=greytext,
horizontalalignment='left', verticalalignment='baseline',
rotation=np.degrees(np.arctan(3.0 * dpdpd)))

# Plot Age lines
Expand Down Expand Up @@ -158,5 +160,6 @@

ax.legend(loc='lower right', numpoints=1)

plt.savefig("ppdot_color_2018.png" if usecolor else "ppdot_2018.png")
plt.savefig("ppdot_color_%s.png"%cat.version if usecolor \
else "ppdot_%s.png"%cat.version)
#plt.show()

0 comments on commit 05a9267

Please sign in to comment.