[yt-users] Off Axis Plot

Nathan Goldbaum nathan12343 at gmail.com
Wed Jul 1 14:54:57 PDT 2015


On Wed, Jul 1, 2015 at 2:20 PM, Chen Jingjing <chenjj235 at gmail.com> wrote:

> Hi yt users,
> I am trying to make multiple off-axis projection plots in the same figure,
> and I follow the example of
> http://yt-project.org/doc/cookbook/complex_plots.html#multi-plot-slice-and-projections
>
> The example has these two lines:
> slc = yt.SlicePlots(...)
> slc_frb = slc.data_source.to_frb(...)
>
> So I did:
> proj = yt.OffAxisProjectionPlot(...)
> proj_frb = proj.data_source.to_frb(...)
>
> But I got this error:
>
> AttributeError: 'OffAxisProjectionDummyDataSource' object has no attribute
> 'to_frb'
>

 Off-axis projections behave a bit different than axis-aligned projections,
and you're running into some of the internal API differences this causes.

In any case, this will work if you do instead:

proj_frb = proj.frb

We should probably update that example to not use to_frb at all, since
there's no reason to construct a new FixedResolutionBuffer object if we can
use the one associated with the plot already.

>
> Can anyone tell me why and how to fix it?
>
> Thanks,
> Jingjing
>
> --
>
> Jingjing Chen [ chenjj235 at gmail.com ]
> Department of Astronomy
> Columbia University
> 550 West 120th Street
> New York, New York 10027
> Cell Phone: +1(347)5746709
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150701/6f8399fb/attachment.html>


More information about the yt-users mailing list