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-p... 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' Can anyone tell me why and how to fix it? Thanks, Jingjing -- Jingjing Chen [ chenjj235@gmail.com ] Department of Astronomy Columbia University 550 West 120th Street New York, New York 10027 Cell Phone: +1(347)5746709
On Wed, Jul 1, 2015 at 2:20 PM, Chen Jingjing <chenjj235@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-p...
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@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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Thanks! 2015-07-01 17:54 GMT-04:00 Nathan Goldbaum <nathan12343@gmail.com>:
On Wed, Jul 1, 2015 at 2:20 PM, Chen Jingjing <chenjj235@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-p...
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@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@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
-- Jingjing Chen [ chenjj235@gmail.com ] Department of Astronomy Columbia University 550 West 120th Street New York, New York 10027 Cell Phone: +1(347)5746709
participants (2)
-
Chen Jingjing
-
Nathan Goldbaum