[yt-users] plot collection labels etc

Chris Malone chris.m.malone at gmail.com
Fri Nov 8 09:26:27 PST 2013


Hi Semyeong,

I think the problem is that the labels automatically get wrapped in LaTeX
mathmode characters ("$"), and so your underscore is indicating a subscript
--- at least this is what I see in yt 3.0 at the moment.  There should
probably be a more clever way of handling this.

For now, I think what you can do (but have not tested) is the following

myprojection = pc.add_projection('H_NumberDensity', 2, data_source=reg,
center=center)
myprojection.set_label("H_NumberDensity")

It looks like the set_label() method of the projection plot uses the
Matplotlib colorbar.set_label() method, which doesn't do any automatic
LaTeX'ing.


On Fri, Nov 8, 2013 at 8:44 AM, Semyeong Oh <semyeong.oh at gmail.com> 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 <brittonsmith at gmail.com>
> 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
>
>
>
>
> _______________________________________________
> 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/d46ec122/attachment.htm>


More information about the yt-users mailing list