[yt-dev] Particle-Only Plots

Andrew Myers atmyers2 at gmail.com
Thu Aug 28 11:52:54 PDT 2014


Hi Matt,

Could you point me this PR? I'm having some trouble finding it.

Thanks,
Andrew


On Thu, Aug 28, 2014 at 4:47 AM, Matthew Turk <matthewturk at gmail.com> wrote:

> On Thu, Aug 28, 2014 at 1:48 AM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
> > Hi Andrew,
> >
> > This is a really great idea and something that should be a big usability
> win
> > as more and more people use yt with particle datasets.  I have several
> > comments, questions, and suggestions but overall an emphatic +1 on this
> > eventually making its way into yt.
> >
> > Is ParticlePlot a subclass of PlotContainer?  Does it make sense to do
> that?
> > For all the other plotting classes there is a sense of a list of fields
> to
> > loop over and store plots for per-object. Your plotting class could
> accept a
> > list of x and y fields (does it?) so I guess you could store all
> > permutations of x and y field combinations and make a plot for each one,
> > although I'm not sure if that makes sense.
> >
> > Should we perhaps instead have a class that splats particle positions
> onto
> > spatial axes and another that does the same for arbitrary combinations of
> > fields like ProfilePlot and PhasePlot?  One issue with your second
> example
> > is that the aspect ratio isn't equal for both axes, which is presumably
> why
> > your spherical distribution of particles appears a bit squashed.  It
> would
> > be straightforward to handle this if we know the x and y axes are
> spatial,
> > less so if the plotting class has to handle axes with generic dimensions.
> >
>
> I'm generally +10 on Andrew's idea; one thing I want to note is that
> the speed of Matplotlib's point plotting can go down quite quickly
> with the number of points.  A splatting routine (which I think Sam has
> put into a PR?) would speed it up, and if the splat size were less
> than the pixel size for the plot, it should be indistinguishable.
>
> > I'd prefer it if we could keep the plotting code as unified as possible.
> > Optimally, this means that individual plots should subclass PlotMPL and
> > ParticlePlot would subclass PlotContainer. Doing so should reduce code
> > duplication and also ease maintainability going forward.  That said, I
> > totally understand that you have the code written already and don't want
> to
> > force you to rewrite a bunch of stuff you've alrady written.  One bonus
> of
> > using the plotting infrastructure that's in yt right now is that you
> should
> > be able to wire up the PlotWindow plot callbacks, at least for plots that
> > have spatial fields along both axes.
> >
> > It might be useful to hash this out in a YTEP.
> >
> > Hope that's not too much feedback - if you can't tell i'm excited about
> > this!
> >
> > -Nathan
> >
> >
> > On Wed, Aug 27, 2014 at 11:26 PM, Andrew Myers <atmyers2 at gmail.com>
> wrote:
> >>
> >> Hi folks,
> >>
> >> A while back, Jeremy Ritter asked the yt-users list if yt could produce
> a
> >> particle plot like that obtained through annotate_particles(), but
> without
> >> loading any mesh data. The answer was "no", but that it isn't too hard
> to
> >> use matplotlib directly. Personally, this is a visualization task that
> I do
> >> all the time, and I think it would be useful to make this type of plot a
> >> one-liner in yt - provided it handles units and labels and such
> >> automatically like any other yt plot.
> >>
> >> I've added this feature in my fork of yt. The interface is the same as
> for
> >> any other yt plots, and the standard plot modification mechanisms should
> >> work. Examples are here and here.
> >>
> >> If there is interest in having this in mainline yt I'll write some docs
> >> and issue a pull request.
> >>
> >> -Andrew
> >>
> >>
> >> _______________________________________________
> >> yt-dev mailing list
> >> yt-dev at lists.spacepope.org
> >> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
> >>
> >
> >
> > _______________________________________________
> > yt-dev mailing list
> > yt-dev at lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
> >
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20140828/9b18a2bd/attachment.htm>


More information about the yt-dev mailing list