Hi Nathan,
Thank you very much for your reply! There is no error message after
this modification, but there is still no title on the pdf/png I get.
It's strange.
Pengfei
2012/7/16 Nathan Goldbaum
Hi Pengfei,
I think you want to replace this line:
p.modify["title"](halos, text='z=%.2f'%z)
With the following:
p.modify["title"]('z=%.2f'%z)
Cheers,
Nathan
On 7/16/12 5:34 PM, Pengfei Chen wrote:
Hi,
I'm trying to add a title for the picture, but I can't find the right command to do so. Here is the code:
pf = load(fn) halos = HaloFinder(pf) pc = PlotCollection(pf, [pos_x, pos_y, pos_z]) p = pc.add_slice("Density", 0) pc.set_width(3*rad, '1') p.modify["hop_particles"](halos, max_number=100, alpha=0.3) p.modify["title"](halos, text='z=%.2f'%z)
And there is some error reported for the last line. The meaning of the error is more than one name is given to the title. Then I replace it with:
p.modify["text"](halos, pos=(0.02, 0.98), text='z=%.2f'%z)
But it still has error. Could someone please help me about it?
Pengfei _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org