In article
<812f3ec8-351f-4b8c-8f9f-454634a9c28e@hd10g2000vbb.googlegroups.com>,
Matt <theothermattrigby@gmail.com> wrote:
> http://dl.dropbox.com/u/13779929/ps_converted_distiller.pdf
These are rendering artifacts from converting the PS/PDF to a
bitmap to display it on the screen. They are a result of the
PS being comprised of a number of individual polygons.
If you zoom into the PDF, you will see that the artifacts are
resolution dependent. That said, I think it is a bug that the
renderer produces these artifacts.
For me the easiest way workaround is to use an image for
the color, rather than using CONTOUR. This approach is
more complicated than using CONTOUR, because you
have to do it differently depending on the device.
Here is a code snippet showing how to handle PS/PDF and X devices.
MAP_IMAGE_KPB is my wrapper for MAP_IMAGE that handles missing data (NANs).
You should be able to use MAP_IMAGE. COLOR_LOOKUP_24_KPB is my function
to scale physical data into colors. IMAGE_24_KPB converts color values
stored as LONGs into RGB bytes.
You can download my routines from here
http://csrp.tamu.edu/downloads/idl/bowman_lib.zip
Using images instead of CONTOUR has some advantages. The resulting
PS files are often much smaller and display more quickly.
Ken Bowman
pixel_scale = 0.05 ;You might need to adjust this to get the right image resolution
MAP_SET, /CYLINDRICAL, /ISOTROPIC, /NOBORDER, LIMIT = [ymin, xmin, ymax, xmax] ;Map projection
data_map = MAP_IMAGE_KPB(REFORM(y[*,*,k]), i0, j0, ni, nj, /BILINEAR, COMPRESS = 1, $ ;Project data to map
SCALE = pixel_scale, LONMIN = xmin, LONMAX = xmax, LATMIN = ymin, LATMAX = ymax)
data_image = COLOR_LOOKUP_24_KPB(data_map, rdf_colors, MIN = y0min, MAX = y0max, $ ;Convert to color image
UNDER_COLOR = rdf_colors[0], OVER_COLOR = rdf_colors[-1])
IF (KEYWORD_SET(eps) OR KEYWORD_SET(pdf)) THEN BEGIN
TV, IMAGE_24_KPB(data_image, TRUE = 3), i0, j0, TRUE = 3, XSIZE = ni, YSIZE = nj ;Display image (PS)
ENDIF ELSE BEGIN
TV, IMAGE_24_KPB(data_image, TRUE = 3), i0, j0, TRUE = 3
ENDELSE
MAP_CONTINENTS, /CONTINENTS, /USA, COLOR = COLOR_24('gray30'), /COUNTRIES ;Draw continents
MAP_GRID, ...
|