[yt-users] origin in SlicePlot

Iapichino, Luigi Luigi.Iapichino at lrz.de
Thu Jul 14 09:52:55 PDT 2016


Hi Nathan,


thanks for the details. I will try to implement this feature. If I get stuck, or if I don't find enough time to work on it, I will open an issue next week.

Cheers,


  Luigi


---

Dr. Luigi Iapichino
Leibniz-Rechenzentrum
Application Support group
Boltzmannstr. 1, 85748 Garching, Germany
Tel.: +49 89 35831 7824
e-mail: luigi.iapichino at lrz.de
________________________________
Von: yt-users <yt-users-bounces at lists.spacepope.org> im Auftrag von Nathan Goldbaum <nathan12343 at gmail.com>
Gesendet: Donnerstag, 14. Juli 2016 18:47
An: Discussion of the yt analysis package
Betreff: Re: [yt-users] origin in SlicePlot



On Thu, Jul 14, 2016 at 11:41 AM, Iapichino, Luigi <Luigi.Iapichino at lrz.de<mailto:Luigi.Iapichino at lrz.de>> wrote:

Dear yt users,


I have a question on the "origin" parameter in SlicePlot: is it possible to have the location of the origin of the plot coordinate system in a user-defined point inside the slice? I am plotting a galaxy cluster where, for sake of visualisation, the center is neither in the slice center, nor in one of the corners, and I would like the coordinate origin there. It looks like something possible only with a lot of efforts, but I hope I am wrong! Looking forward to your suggestions,


Best regards,


  Luigi

Hi Luigi,

That isn't implemented currently, although it sounds like a reasonable feature to add.

The place that needs to be modified is this function:

https://bitbucket.org/yt_analysis/yt/src/1c339ea7619997cba6842e973cf5f0e13b2f30ee/yt/visualization/plot_window.py?at=yt&fileviewer=file-view-default#plot_window.py-627

You would need to add a new if statement to account for the case when origin is a two-element list, tuple or ndarray, and then just use that value. You would also need to update the docstrings for "origin" which are replicated a few places in that file. I think this would be a pretty simple modification.

If you're interested in working on this, we would very much appreciate it if you contributed this modification back to the yt project. You can get more information about contributing to yt on our developer guide:

http://yt-project.org/docs/dev/developing/index.html

People on this list are also very happy to help out with questions about contributing to yt.

If you're not interested in implementing this then i'd suggest opening an issue for the feature request:

https://bitbucket.org/yt_analysis/yt/issues/new



---

Dr. Luigi Iapichino
Leibniz-Rechenzentrum
Application Support group
Boltzmannstr. 1, 85748 Garching, Germany
Tel.: +49 89 35831 7824<tel:%2B49%2089%2035831%207824>
e-mail: luigi.iapichino at lrz.de<mailto:luigi.iapichino at lrz.de>

_______________________________________________
yt-users mailing list
yt-users at lists.spacepope.org<mailto: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/20160714/00167cbe/attachment.htm>


More information about the yt-users mailing list