[yt-users] custom axes tickmarks projection plot

Gabriel Goodwin ggoodwin52 at gmail.com
Mon Aug 10 11:33:55 PDT 2015


Hello All,

Does know how to specify custom tickmark locations for the y axis of a
projection plot in the 3.2 release? I was able to do it in 3.1 using the
following code:

p =
yt.ProjectionPlot(ds,2,string,center=[cent,height,0],width=(wide,height),origin="native",data_source=cut,method='integrate',weight_field='temperature')
ax = p.plots[string].axes
ax.yaxis.set_ticks([0.00, 0.15, 0.30])

This would place tickmarks and their labels on the y axis at 0, 0.15, and
0.3.

When I try and do this using yt 3.2 I get the following error:

AttributeError                            Traceback (most recent call
last)<ipython-input-76-6e901a613181> in <module>()     16 ax =
p.plots[string].axes---> 17 ax.yaxis.set_ticks([0.00, 0.15, 0.30])
AttributeError: 'NoneType' object has no attribute 'yaxis'

It appears that we can no longer manipulate the axes object like we
were able to in 3.1.

Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150810/6fe453e8/attachment.htm>


More information about the yt-users mailing list