[yt-dev] Issue #1064: Cannot access projection_plot.plots[string].axes objects (yt_analysis/yt)

ggoodwin52 issues-reply at bitbucket.org
Wed Aug 12 12:05:08 PDT 2015


New issue 1064: Cannot access projection_plot.plots[string].axes objects
https://bitbucket.org/yt_analysis/yt/issues/1064/cannot-access-projection_plotplots-string

ggoodwin52:

In 3.2 we can no longer access and modify the plot axes. In 3.1 this could be done with the following code:


```
#!python

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])
```

In 3.2, I get the following error when running the above code:

```
#!python

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'
```







More information about the yt-dev mailing list