Re: white line on plot at meridian 0

From: Kyle Griffin <ksgriffin2_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 15 2014 - 12:14:24 MDT

Hi Ioana,

Have you tried setting gsnAddCyclic = True in your resources for the
contours? That should fix the problem.

There are a couple of approaches to get the near-zero contours to be white.
One option is to create a custom color table, as you can do via the
instructions found at
http://ncl.ucar.edu/Document/Graphics/create_color_table.shtml

You can also try to read in the color table yourself (with
read_colormap_file) and manually set the two colors you want white to be
white (e.g. cmap(5,:) = (/0,0,0,0/) if you want the 6th color from the
beginning to be white). This is probably the most efficient way, once you
learn how to set it up.

Along the same lines, you can manually specify the levels and use an array
of the colors you specify in that color table either as RGB triplets, like
(/(/255,0,0/),(/0,0,255/),(/255,0,255/)/) for a color set of red, blue, and
purple or an array of named colors, like ("red","blue","purple") for the
same effect. Assign this array of colors to cnFillColors once your levels
are set appropriately.

Finally you can also make two plots - one for the values >0.01 and one for
the values <-0.01 and have the colors cut off appropriately, leaving the
white space in between blank.

It does not seem, unfortunately, like there is a straightforward solution.
If you'd like, I can provide some of my code to get this done (with the
read_colormap_file based solution), although my code isn't exactly in line
with the best practices for version of NCL 6.1.0 and newer.

Kyle

----------------------------------------
Kyle S. Griffin
Department of Atmospheric and Oceanic Sciences
University of Wisconsin - Madison
Room 1421
1225 W Dayton St, Madison, WI 53706
Email: ksgriffin2@wisc.edu

On Tue, Apr 15, 2014 at 11:43 AM, Ioana Colfescu <colfescu@cola.iges.org>wrote:

> Hi,
>
> I'm using lonFlip and when I use it I get this white line ( see plot
> attached ) at lon 0 . Could someone please tell me what should I do to get
> rid of that line ?
> Also, I'd like to have the contours between -0.01 and 0.01 white - what
> should I do for that ? ( and still use the same color table).
> Thanks,
> Ioana
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 15 12:14:57 2014

This archive was generated by hypermail 2.1.8 : Wed Apr 16 2014 - 09:14:14 MDT