Dear yt-users, I am new to yt and and i am stuck in annotating projection plots. Using the Plot Window interface, i try to create two equal projection plots with yt.ProjectionPlot and yt.OffAxisProjectionPlot. In detail, the functions are called with: p1 = ProjectionPlot(ds, 'z', 'density',center='max',width = ((xw,'cm'),(yw,'cm'))) north_vector = [0.0,1.0,0.0] off=[0.0,0.0,1.0] ds.periodicity = (True, True, True) p2 = OffAxisProjectionPlot(ds,off,'density', center='max',width=((xw,'cm'),(yw,'cm'),(zw,'cm')),north_vector=north_vector) While i receive similar plots from these calls, i am stuck to annotate the plots. I try to draw spheres with: p1.annotate_sphere( [xp,yp,zp],(1.0e14,'cm'), {'fill':True, 'color':'w'}) p2.annotate_sphere( [xp,yp,zp],(1.0e14,'cm'), {'fill':True, 'color':'w'}) where xp, yp, zp is calculated to lie on the plane defined by the point 'center='max'' and the vector 'off'. For p1, i get an annotated image, but for p2, the annotation fails. Is there a different way to annotate OffAxisProjectionPlots? Greetings
On Wed, Nov 11, 2015 at 3:03 AM, Gunther Lukat
Dear yt-users,
I am new to yt and and i am stuck in annotating projection plots. Using the Plot Window interface, i try to create two equal projection plots with yt.ProjectionPlot and yt.OffAxisProjectionPlot. In detail, the functions are called with:
p1 = ProjectionPlot(ds, 'z', 'density',center='max',width = ((xw,'cm'),(yw,'cm')))
north_vector = [0.0,1.0,0.0] off=[0.0,0.0,1.0] ds.periodicity = (True, True, True) p2 = OffAxisProjectionPlot(ds,off,'density', center='max',width=((xw,'cm'),(yw,'cm'),(zw,'cm')),north_vector=north_vector)
While i receive similar plots from these calls, i am stuck to annotate the plots. I try to draw spheres with:
p1.annotate_sphere( [xp,yp,zp],(1.0e14,'cm'), {'fill':True, 'color':'w'}) p2.annotate_sphere( [xp,yp,zp],(1.0e14,'cm'), {'fill':True, 'color':'w'})
where xp, yp, zp is calculated to lie on the plane defined by the point 'center='max'' and the vector 'off'.
For p1, i get an annotated image, but for p2, the annotation fails.
Is there a different way to annotate OffAxisProjectionPlots?
Ah, it looks like there's a problem with the way the coordinate system is being interpreted. I've opened an issue to track this: https://bitbucket.org/yt_analysis/yt/issues/1143/sphere-callback-for-offaxis...
Greetings
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Gunther Lukat
-
Nathan Goldbaum