[yt-users] text inside figure window?
Stephanie Tonnesen
stonnes at gmail.com
Wed Feb 19 11:30:52 PST 2014
Hi users,
I am still fiddling with PhasePlot, and would now like to be able to have
some text inside the window. I am *not* looking for a legend box or
anything, just text. If I were writing this on a plot in python I would
just be looking to use p.text(x,y,'text'). I will paste the section of
code writing the PhasePlot below.
Thanks!
Stephanie
profile = Profile2D(tracerp25, x_field='zkpc', x_n=36, x_min=-6.,
x_max=0.,x_log=False,y_field='BMagnitude',y_n=40,y_min=1e-8,y_max=1e-4,y_log=True,weight_field=None)
profile.add_fields(['CellMassMsun'])
plot =
PhasePlot(tracerp25,"zkpc","BMagnitude",["CellMassMsun"],profile=profile,fontsize=21)
plot.set_log("totPressure",True)
plot.set_log("z-velocity",False)
plot.set_log("zvelocity8",False)
plot.set_zlim("CellMassMsun",9e3,1e8)
plot.set_figure_size(4.5)
plot.set_cmap(field="CellMassMsun",cmap='Eos B')
plot.plots['CellMassMsun'].hide_colorbar()
ax = plot.plots['CellMassMsun'].axes
ax.set_ylabel(r'|B| (Gauss)',fontsize=18)
#ax.set_xlabel('z dist from disk plane (kpc)',fontsize=27)
#ax.set_ylabel(r' ',fontsize=27)
#ax.set_xlabel('dist below disk plane (kpc)',fontsize=18)
ax.set_xlabel(r' ',fontsize=18)
for label in ax.xaxis.get_ticklabels():
label.set_rotation(35)
label.set_fontsize(18)
label.set_visible(False)
for label in ax.yaxis.get_ticklabels():
label.set_fontsize(18)
# label.set_visible(False)
ax.xaxis.set_ticks([-6,-5,-4,-3,-2,-1,0])
plot.save()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140219/9dc98365/attachment.htm>
More information about the yt-users
mailing list