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> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">you are right, 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> </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> </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> </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 &quot;smooth lines&quot; by blending pixels with the &quot;environment&quot;; it is all handled by the cairo library.  I am not entirely sure why the legend gives you a different color... but wait a minute!  One trick that gxyat uses to avoid those funny lines in filled  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>   Arlindo</div><div><br></div><div><br></div><div> </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> </div>
<div><font color="#0000ff" size="2" face="Arial"></font> </div>
<p><font size="2"></font></p><div class="im"><font size="2">--<br>Bernd Becker   Climate Impacts Product 
Development<br>Met Office Hadley Centre    FitzRoy Road  
Exeter   Devon EX1 3PB  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><p></p>
<div> </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>    Arlindo</div>
<div><br></div>
<div> </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>