[gradsusr] GXyat question re. colours

Arlindo da Silva dasilva at alum.mit.edu
Thu Sep 22 11:51:44 EDT 2011


On Thu, Sep 22, 2011 at 4:25 AM, Becker, Bernd <
bernd.becker at metoffice.gov.uk> wrote:

> **
> Arlindo,
>
> you are right, this is an artifact of antialiasing
> (see attached plot: the yellows are the same in contour and in legend box)
>
> So we found the cause.
>
> But the plot looks no where near as impressive as the previous output from
> gxyat.
>
> What can we try to do about that?
>

Anti-aliasing is a perceptual approximation that achieves "smooth lines" by
blending pixels with the "environment"; 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.

   Arlindo




> Cheers,
> Bernd.
>
>
>
> --
> Bernd Becker   Climate Impacts Product Development
> Met Office Hadley Centre    FitzRoy Road  Exeter   Devon EX1 3PB  United
> Kingdom
> Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050
> E-mail:bernd.becker at metoffice.gov.uk -
> http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/bernd-becker
>
> http://www.metoffice.gov.uk/news/releases/archive/2011/weather-game
>
>
>
>  ------------------------------
> *From:* gradsusr-bounces at gradsusr.org [mailto:
> gradsusr-bounces at gradsusr.org] *On Behalf Of *Arlindo da Silva
> *Sent:* 22 September 2011 03:10
> *To:* GrADS Users Forum
> *Subject:* Re: [gradsusr] GXyat question re. colours
>
> On Wed, Sep 21, 2011 at 7:02 AM, Becker, Bernd <
> bernd.becker at metoffice.gov.uk> wrote:
>
>>
>> Hello,
>>
>> How can I force gxyat to save the colours to a gif file as displayed on
>> screen ?
>>
>> Please find attached 2 images,
>> one created with printim (authentic colours) and one
>> created with gxyat and observe, that the yellow in the contour plot
>> differs from the
>> yellow in the legend.
>>
>> What could be the cause of that?
>>
>> What can I do about it?
>>
>>
> This is strange. Possibly this is an artifact of anti-aliasing. Could you
> try turning anti-aliasing off?
>
> ga-> gxyat +a file.png
>
>     Arlindo
>
>
> --
> Arlindo da Silva
> dasilva at alum.mit.edu
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110922/62f00d09/attachment-0003.html 


More information about the gradsusr mailing list