comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » EPS to PDF contour plots
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: EPS to PDF contour plots [message #75700 is a reply to message #75568] Mon, 04 April 2011 11:13 Go to previous messageGo to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
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, ...
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: EPS to PDF contour plots
Next Topic: Re: netcdf + idl: posixio.c:265: px_pgin: Assertion ...

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:59:15 PDT 2025

Total time taken to generate the page: 1.03692 seconds