[yt-users] sliceplot through z axis, but not through z=0

Nathan Goldbaum nathan12343 at gmail.com
Thu Aug 4 14:38:47 PDT 2016


In that case, why don't you try:

    from yt.units import km

    center = [0, 0, 1e5]*km
    slc = SlicePlot ( ds, 'z', 'field' , origin = 'lower-center-domain',
center=center)

On Thu, Aug 4, 2016 at 4:28 PM, tazkera haque <h.tazkera at gmail.com> wrote:

> HI Nathan ,
>
> you might be right, the domain is -2.8e5 to +2.8e5 in km, if that is the
> case, then how should I change the origin, other than 'lower-center-domain'
> option, may I enter numbers to mention exactly how far from z =0 I want my
> slice through?
>
> -Best
>
> On Thu, Aug 4, 2016 at 4:47 PM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
>
>> What is ds.length_unit.in_units('km') for this simulation? It might be
>> the case that 0 and 1 along z are not much different.
>>
>> -Nathan
>>
>> On Thu, Aug 4, 2016 at 3:45 PM, tazkera haque <h.tazkera at gmail.com>
>> wrote:
>>
>>> Hi Nathan,
>>>
>>> I did exactly, unfortunately I am still getting the same plot
>>>
>>> -best
>>>
>>> On Fri, Aug 5, 2016 at 2:01 AM, Nathan Goldbaum <nathan12343 at gmail.com>
>>> wrote:
>>>
>>>> Hi Tazkera,
>>>>
>>>> On Thu, Aug 4, 2016 at 2:50 PM, tazkera haque <h.tazkera at gmail.com>
>>>> wrote:
>>>>
>>>>> HI Nathan ,
>>>>>
>>>>> Thanks, I fixed it, but I need to cut through a different plane than
>>>>> z=0 , so that i get a little more material through sliceplot through z
>>>>> plane, I used command
>>>>>
>>>>> slc = SlicePlot ( ds, 'z', 'field' , origin = 'lower-center-domain')
>>>>>
>>>>
>>>> You need to specify the center,
>>>>
>>>> center = ds.domain_center
>>>> center[2] = 1
>>>> slc = SlicePlot ( ds, 'z', 'field' , origin = 'lower-center-domain',
>>>> center=center)
>>>>
>>>>
>>>>>
>>>>> but changing the origin still returns me the same plot as it did when
>>>>> I did not include the origin.
>>>>>
>>>>> My question is is there any way I can cut through z = 1 and not
>>>>> through z = 0 ?
>>>>>
>>>>> -Best
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Aug 3, 2016 at 3:59 PM, Nathan Goldbaum <nathan12343 at gmail.com
>>>>> > wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Aug 3, 2016 at 2:56 PM, tazkera haque <h.tazkera at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi yt people,
>>>>>>>
>>>>>>> I have this issue, where I want to get the sliceplots through z and
>>>>>>> x axis, my x axis slice plot is OK but the sliceplot through z axis does
>>>>>>> not show much info. I assume the yt sliceplot through z is defined through
>>>>>>> z=0, may I make a sliceplot that goes through z = 1 , 2 or z = -1 , -2 ?
>>>>>>>
>>>>>>> what changes should I make to this command ?
>>>>>>>
>>>>>>> c =[0,0,0]
>>>>>>> p1 = yt.SlicePlot(pf,field, c)
>>>>>>>
>>>>>>>  I tried changing c = [0,0,2] , it didn't make any change to my plot.
>>>>>>>
>>>>>>> Thanks-
>>>>>>> Tazkera
>>>>>>>
>>>>>>
>>>>>> Hi Tazkera,
>>>>>>
>>>>>> You want to do something like:
>>>>>>
>>>>>> p1 = yt.SlicePlot(ds, 'z', field, center=c)
>>>>>>
>>>>>> Looking at the API docs for SlicePlot you can see how you weren't
>>>>>> actually setting the center keyword argument (since you only used three
>>>>>> positional arguments):
>>>>>>
>>>>>> http://yt-project.org/doc/reference/api/generated/yt.visuali
>>>>>> zation.plot_window.SlicePlot.html
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>>
>
> _______________________________________________
> 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/20160804/818065cd/attachment-0001.htm>


More information about the yt-users mailing list