<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The anti-aliasing in the Cairo library does make the colors seem a little duller than when drawing without anti-aliasing. There is no real cure for this, although if you increase the thickness of the anti-aliased lines, they do brighten. For lines that we know will be exactly horizontal or vertical, we plan to 'snap' them to the pixel grid and then they won't be drawn with the anti-alias blending on the edges. This will make the plot frame and other rectangles look sharp and bright. Turning off anti-aliasing for polygon fills results in very faint gaps that are visible between adjacent polygons of the same color (e.g. in a shaded plot), so I don't recommend that. A possible solution is to draw the perimeter of each polygon to cover the gaps, but this is a performance hit. We are still thinking about the user interface to control all these factors. For using gxyat right now, I would try tweaking the line thickness and the size of your output image, those things may improve the appearance/dimness of the anti-aliased lines.&nbsp;<div>--Jennifer<br><div><div><br></div><div><br><div><br><div><div>On Sep 22, 2011, at 11:51 AM, Arlindo da Silva wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Thu, Sep 22, 2011 at 4:25 AM, Becker, Bernd <span dir="ltr">&lt;<a href="mailto:bernd.becker@metoffice.gov.uk">bernd.becker@metoffice.gov.uk</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <u></u> <div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Arlindo,</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span>&nbsp;</div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">you are right,&nbsp;this is an artifact of antialiasing</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">(see attached plot: the yellows are the same in contour and in legend box)</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span>&nbsp;</div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">So we found the cause.</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span>&nbsp;</div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">But the plot looks no where near as impressive as the previous output from gxyat.</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span>&nbsp;</div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">What can we try to do about that?</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span></div></div></blockquote><div><br></div><div>Anti-aliasing is a perceptual approximation that achieves "smooth lines" by blending pixels with the "environment"; it is all handled by the cairo library. &nbsp;I am not entirely sure why the legend gives you a different color... but wait a minute! &nbsp;One trick that gxyat uses to avoid those funny lines in filled &nbsp;contours is to turn anti-alising off every time a (filled) polygon is drawn. How are you creating your legend? Try using the more basic line to, move to function instead of a polygon function; this way you will have the same anti-aliasing used by the contour lines.</div> <div><br></div><div>&nbsp; &nbsp;Arlindo</div><div><br></div><div><br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Cheers,</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Bernd.</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span>&nbsp;</div> <div><font color="#0000ff" size="2" face="Arial"></font>&nbsp;</div><div><font size="2"></font><br class="webkit-block-placeholder"></div><div class="im"><font size="2">--<br>Bernd Becker&nbsp;&nbsp; Climate Impacts Product Development<br>Met Office Hadley Centre&nbsp;&nbsp;&nbsp; FitzRoy Road&nbsp; Exeter&nbsp;&nbsp; Devon EX1 3PB&nbsp; United Kingdom<br>Tel.: +44 (0) 1392 884511 Fax: <a href="tel:%2B44%20%280%29870%20900%205050" value="+448709005050" target="_blank">+44 (0)870 900 5050</a><br></font></div><font size="2"><a href="mailto:E-mail%3Abernd.becker@metoffice.gov.uk" target="_blank">E-mail:bernd.becker@metoffice.gov.uk</a> - <a href="http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/bernd-becker" target="_blank">http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/bernd-becker</a><div class="im"> <br><a href="http://www.metoffice.gov.uk/news/releases/archive/2011/weather-game" target="_blank">http://www.metoffice.gov.uk/news/releases/archive/2011/weather-game</a><br></div></font><div><br class="webkit-block-placeholder"></div> <div>&nbsp;</div><br> <div dir="ltr" lang="en-us" align="left"> <hr> <font size="2" face="Tahoma"><b>From:</b> <a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> [mailto:<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>] <b>On Behalf Of </b>Arlindo da Silva<br><b>Sent:</b> 22 September 2011 03:10<br><b>To:</b> GrADS Users Forum<br><b>Subject:</b> Re: [gradsusr] GXyat question re. colours<br></font><br></div><div><div></div><div class="h5"> <div></div>On Wed, Sep 21, 2011 at 7:02 AM, Becker, Bernd <span dir="ltr">&lt;<a href="mailto:bernd.becker@metoffice.gov.uk" target="_blank">bernd.becker@metoffice.gov.uk</a>&gt;</span> wrote:<br> <div class="gmail_quote"> <blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote"><br>Hello,<br><br>How can I force gxyat to save the colours   to a gif file as displayed on<br>screen ?<br><br>Please find attached 2   images,<br>one created with printim (authentic colours) and one<br>created   with gxyat and observe, that the yellow in the contour plot<br>differs from   the<br>yellow in the legend.<br><br>What could be the cause of   that?<br><br>What can I do about it?<br><br></blockquote> <div><br></div> <div>This is strange. Possibly this is an artifact of anti-aliasing. Could you try turning anti-aliasing off?</div> <div><br></div> <div>ga-&gt; gxyat +a file.png</div> <div><br></div> <div>&nbsp; &nbsp; Arlindo</div> <div><br></div> <div>&nbsp;</div></div>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu" target="_blank">dasilva@alum.mit.edu</a><br></div></div></div> <br>_______________________________________________<br> gradsusr mailing list<br> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br> <br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br> _______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br></div></div></div></div></body></html>