[yt-users] plot collection labels etc
Nathan Goldbaum
nathan12343 at gmail.com
Fri Nov 8 09:53:49 PST 2013
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 :)
-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<https://www.dropbox.com/s/jud8ekprajryykk/prob.png>
>>>
>>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20131108/d247d9f5/attachment.html>
More information about the yt-users
mailing list