[gradsusr] colored polygons in images

Jeffrey Duda jdduda at iastate.edu
Thu Dec 16 14:38:39 EST 2010


Hello,
I keep seeing strange things when I try to plot a colored filled polygon and
then save the image, in particular within a colorbar.  I'm using the color
bar script provided in the scripting library page, cbar.gs.  The retangles
always seem to "bleed" over the top line of the colorbar (seen only in
horizontal color bars).  The original script doesn't have a black outline
drawn on the top of a horizontal color bar (well it does, but it is covered
up by the filled colored polygons).  I thought that made the color bar look
tacky, which is why I modified the script ever so slightly to get that top
line to appear.  As an example, I've attached 3 images all of the same data,
but presented in different ways to show how the color bar acts.

grads.png is a screenshot of my grads window (using the print screen key)
showing the color bar appearing correctly as I want it to.

2.gif was obtained by issuing the command "printim 2.gif" using the same
image as is shown in grads.png

3.gif is the same thing as 2.gif only sized as 5000 x 5000 pixels.  It shows
the overlap is still there, but to much less of an extent relative to the
size of the image.  This makes me wonder that the overlap is some default
like "1 pixel greater no matter what the size" so that it doesn't show up as
well for larger images.

Can someone explain to me this behavior and how to keep the color bar colors
from overlapping the top line of the color bar in printed images that are
obtained using printim?  Thanks.

Jeff Duda

-- 
Jeff Duda
Iowa State University
Meteorology Graduate Student
3134 Agronomy Hall
www.meteor.iastate.edu/~jdduda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101216/5f7a7196/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grads.png
Type: image/png
Size: 68091 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20101216/5f7a7196/attachment-0003.png 


More information about the gradsusr mailing list