overplot ~100,000 points onto a figure
Hi, I want to overlie >100,000 points onto a plot. Using annotate_marker I have no issue with a small number of points, however if I want to plot more than 10,0000 points to overlie, it takes almost an hour to produce that plot. Here is the code I use: for ipar in range(len(xpMpc)): slc.annotate_marker(ds.arr([xpMpc[ipar],ypMpc[ipar],zpMpc[ipar]],'Mpc').in_units('code_length'),coord_system='data',marker='.',plot_args={'color':'cyan','s':1,'alpha':0.3}) I wonder is there any way I can speed this up? Thank you very much, Huanqing
Hi,
You'll need to use the yt master branch to use it, but we recently accepted
a pull request which makes it possible to pass multiple points to
annotate_marker:
https://github.com/yt-project/yt/pull/2122
There are instructions for how to run yt from a checkout of the git
repository here:
http://yt-project.org/doc/installing.html#installing-yt-from-source
By the way, I had to manually approve your message to the mailing list. You
need to be subscribed to the mailing list to post to the list without
moderation and to get replies unless someone explicitly CC's you (as I've
done here).
-Nathan
On Wed, Jan 16, 2019 at 2:33 PM Huanqing
Hi,
I want to overlie >100,000 points onto a plot. Using annotate_marker I have no issue with a small number of points, however if I want to plot more than 10,0000 points to overlie, it takes almost an hour to produce that plot. Here is the code I use:
for ipar in range(len(xpMpc)):
slc.annotate_marker(ds.arr([xpMpc[ipar],ypMpc[ipar],zpMpc[ipar]],'Mpc').in_units('code_length'),coord_system='data',marker='.',plot_args={'color':'cyan','s':1,'alpha':0.3})
I wonder is there any way I can speed this up?
Thank you very much, Huanqing _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
participants (2)
-
Huanqing
-
Nathan Goldbaum