<br><br><div class="gmail_quote">On Fri, Jul 17, 2009 at 3:17 AM, Dhaval Prajapati <span dir="ltr"><<a href="mailto:dhaval.prajapati@iccsir.org">dhaval.prajapati@iccsir.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#ffffff"><div><font face="Verdana" size="2"></font></div>
<div><font face="Verdana" size="4"> Hi,<br><br>I have prepared . ps files using grads. Now in the file there are horizontal lines coming for colors <br></font><font face="Verdana" size="4">How to remove it?<br>is there any command to get batter images?<br>
</font><font face="Verdana" size="2"><font size="4">I am attaching one file for sample in both .ps and .jpg format</font></font></div></div></blockquote><div><br></div><div><br></div><div>Try "gxyat" that comes with the opengrads bundle (available from <a href="http://opengrads.org">http://opengrads.org</a>). Basically, gxyat is a replacement for "printim", although it can produce .ps, .pdf and .svg output. More info here:</div>
<div><br></div><div> <a href="http://opengrads.org/wiki/index.php?title=Gxyat">http://opengrads.org/wiki/index.php?title=Gxyat</a></div><div><br></div><div>Some remarks on these "lines":</div><div><br></div>
<div>1) The "lines" you are referring do not appear if you print your postscript file on paper, only on the screen. These "lines" come from an artifact of the grads shading algorithm and the anti-aliasing algorithm used by the programs that display postscript on the screen. However, depending on your display program, sometimes you can turn anti-aliasing off and the lines go way. However, the fonts do not look as good.</div>
<div><br></div><div>2) When you convert your postscript to jpg, anti-aliasing is usually applied and you get the "lines". Again, depending on your conversion program you can turn anti-aliasing off and get rid of the "lines" at the expense of jagged fonts.</div>
<div><br></div><div>3) What "gxyat" does when creating image files (.png in this case) is to use anti-aliasing when drawing lines and turn anti-aliasing off when doing polygon fills. In the end you get smooth fonts and no "lines". In addition, "gxyat" gives you a lot more flexibility with transparency.</div>
<div><br></div><div>4) If you write .ps/.pdf files with gxyat you will have the same problem with the "lines". The reason is that there is no way (that I know of) in postscript to turn anti-aliasing on/off for part of a page, it is all or nothing.</div>
<div><br></div><div>BTW, you can use "gxyat" from the grads command line (replacement for "printim"):</div><div><br></div><div>ga-> gxyat image.png</div><div><br></div><div>or from the OS command line (replacement for gxpng, gxeps):</div>
<div><br></div><div>$ gxyat -o image.png image.gmf</div><div><br></div><div>where "image.gmf" is a grads metafile. The SVG output is very useful to import grads output into vector graphics programs such as Adobe Illustrator or Inkscape without loosing any resolution (great for posters).</div>
<div><br></div><div>It would be great if someone could contribute a recipe to the Cookbooks illustrating these points.</div><div><br></div><div> Arlindo</div><div><br></div><div><br></div></div>-- <br>Arlindo da Silva<br>
<a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>