[yt-users] plot collection labels etc

Geoffrey So gsiisg at gmail.com
Fri Nov 8 16:56:41 PST 2013


Hi all,

I just want to address the PlotCollection question on colorbar for phase
diagrams, since I've ran into the same problem a while back.  Chris' method
of "myprojection.set_label("H_NumberDensity")" didn't work for me at least
in phase plots.

"I still need to use PlotCollection for phase plots (Is there equivalent
things for phase plots?),
and the problem persists. For example, ‘H_NumberDensity’ shows ’N’ as a
subscript."

http://paste.yt-project.org/show/4043/

- In the script under method 2, what I've done is use yt for the gathering
of data (very quick with lazy_reader=True with multiple processors even on
big datasets) and use matplotlib to do custom labels.  This is more
flexible in terms of the customizations you want to do, but it's also a lot
of trial and error and digging through matplotlib's burdensome
documentation.

Hope that solves your trouble Semyeong

Questions I have:

- will the new function that replaces PlotCollection's phase plot
functionality going to use BinnedProfile2,3D in yt-3.0?  Or will I have to
rewrite scripts that uses it currently?

- Since the phase plot bins the data in equal spaced bins in log space when
it is specified, shouldn't the pixels when plotted in log scale be also
different size?  Or better yet, shouldn't the x, y axis be labeled as Log
x: 0 1, 2, 3 instead of x: 10^0, 10^1, 10^2, 10^3?

From
G.S.


On Fri, Nov 8, 2013 at 9:57 AM, Matthew Turk <matthewturk at gmail.com> wrote:

> On Fri, Nov 8, 2013 at 12:53 PM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
> > Hi Andrew,
> >
> > The most straightforward way to do this is to use a data_source:
> >
> > region = pf.h.region(center=[0.5, 0.5, 0.5], left_edge=[0, 0, 0.4,
> > right_edge=[1., 1., 0.6])
> > plot = ProjectionPlot(pf, 2, 'Density', data_source=region)
> >
> > This will select data using the region data container supplied on the
> first
> > line.
> >
> > It would probably be possible to add a `depth` keyword argument to
> > ProjectionPlot that constructs such a region in the ProjectionPlot
> > initializer.  Pull requests are more than welcome :)
>
> We have a lot of arguments to that class already.  I think if we add
> any more, it might collapse under the weight of its own docstring.  :)
>
> >
> > -Nathan
> >
> >
> > On Fri, Nov 8, 2013 at 9:16 AM, Andrew James Emerick <
> aje2123 at columbia.edu>
> > wrote:
> >>
> >> To tack onto this conversation, it seemed to be the case that I could
> only
> >> generate thin projections via plot collections. Is there a replacement
> for
> >> this in th works?
> >>
> >>
> >>
> >> Andrew E
> >>
> >>
> >> On Friday, November 8, 2013, Semyeong Oh wrote:
> >>>
> >>> Hi Britton,
> >>>
> >>> I see. But it seems like I still need to use PlotCollection for phase
> >>> plots (Is there equivalent things for phase plots?),
> >>> and the problem persists. For example, ‘H_NumberDensity’ shows ’N’ as a
> >>> subscript.
> >>>
> >>> My instinfo is 6f28a1477055 in case it helps.
> >>>
> >>> Semyeong
> >>>
> >>> ________________________________
> >>> From: Britton Smith Britton Smith
> >>> Reply: Discussion of the yt analysis package
> yt-users at lists.spacepope.org
> >>> Date: November 8, 2013 at 2:52:44 AM
> >>> To: Discussion of the yt analysis package yt-users at lists.spacepope.org
> >>> Subject:  Re: [yt-users] plot collection labels etc
> >>>
> >>> Hi Semyeong,
> >>>
> >>> The PlotCollection is in the process of being phased out.  For Slices
> and
> >>> Projections, it has been completely replaced by the functions
> SlicePlot and
> >>> ProjectionPlot.  I suggest you have a look here:
> >>> http://yt-project.org/docs/dev/visualizing/plots.html
> >>>
> >>> Britton
> >>>
> >>>
> >>> On Fri, Nov 8, 2013 at 6:32 AM, Semyeong Oh <semyeong.oh at gmail.com>
> >>> wrote:
> >>>>
> >>>> Hi, I have a couple of questions on PlotCollection
> >>>>
> >>>> First, the labels on plot collection appear funny like this
> >>>>
> >>>> Here’s the code:
> >>>> pc = PlotCollectionInteractive(pf)
> >>>>
> >>>> pc.add_projection('H_NumberDensity', 2, data_source=reg,
> center=center)
> >>>> pc.set_width(width, 'unitary’)
> >>>>
> >>>> There seem to be a couple of mailing list discussions, but is it
> >>>> something that
> >>>> wasn’t fixed for PlotCollectionInteractive?
> >>>>
> >>>> Also, if I am making multiple plots using the same data_source,
> >>>> it seems that I have to do set_width every time I add a new plot.
> >>>> I’m wondering
> >>>>
> >>>> 1. if there is some way to set global width of a PlotCollection?
> >>>> 2. when is the fixed resolution buffer actually made? Is it when I
> >>>> save/show the plots?
> >>>>
> >>>> Thanks for your help.
> >>>> Semyeong
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> yt-users mailing list
> >>>> yt-users at lists.spacepope.org
> >>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>>
> >>>
> >>> _______________________________________________
> >>> yt-users mailing list
> >>> yt-users at lists.spacepope.org
> >>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>
> >>>
> >>>
> >>
> >>
> >> --
> >> Graduate Student
> >> Columbia University
> >> Department of Astronomy
> >>
> >>
> >> _______________________________________________
> >> yt-users mailing list
> >> yt-users at lists.spacepope.org
> >> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>
> >
> >
> > _______________________________________________
> > yt-users mailing list
> > yt-users at lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> _______________________________________________
> 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/20131108/44f92a88/attachment.html>


More information about the yt-users mailing list