[yt-users] anti-aliasing slices with near-constant fields

Brian O'Shea bwoshea at gmail.com
Sun Oct 24 20:01:18 PDT 2010


Hi Nathan,

This ought to do the trick.  The important line is:

p._antialias = False

--Brian

from yt.mods import *

for n in range(0,36):
    pf = load("DD%04i/DD%04i" % (n,n))
    pc = PlotCollection(pf, center=[0.5, 0.5, 0.5])

    for axis in range(0,3):
        p = pc.add_slice("Density",axis)
        if n == 0:
            print "this is ",n,", turning off anti-aliasing"
            p._antialias = False
    pc.set_width(0.1,'1')
    pc.save("%s" % pf)



On Sun, Oct 24, 2010 at 10:55 PM, Nathan Roth
<nathaniel.roth at berkeley.edu>wrote:

> Hello,
>
>   Could I see an example of the lines of code that would allow me to view a
> slice with anti-aliasing turned off? In a test problem I am running, some
> fields values start out with constant values across the simulation box, and
> when I plot slices they show up garbled.
>
>   Thanks,
>   Nathan
>
> _______________________________________________
> 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/20101024/bb3588bd/attachment.htm>


More information about the yt-users mailing list