[gradsusr] GrADS default colors?

Eric Altshuler ela at cola.iges.org
Tue Apr 20 16:54:15 EDT 2010


Hello Sim,

You say you want to plot streamlines, but your attached plot shows some colored contours. The colors 0 and 1 are not necessarily black and white, respectively. 0 is the background color (black by default) and 1 is the foreground color (white by default). If you have used the 'set display' command to get a white background (e.g. 'set display color white'), then 0 should be white and 1 should be black. (There is another command, 'set background', but it is undocumented, and I'm not sure what effect it might have, especially in combination with 'set display'.)

Your approach using 'set clevs' and 'set ccols' doesn't work for streamlines. For one thing, streamlines only represent the nondivergent part of the wind field, so the wind speed can't be determined from the streamfunction alone. There is a better way to accomplish what you want. Mask out all grid points where the wind speed is less than 1 m/s, and display the wind using this mask:

'set display color white'
'set gxout stream'
'wspd=mag(u,v)'
'd maskout(u,wspd-1.0);maskout(v,wspd-1.0)'

This will only draw (black) streamlines where the wind speed exceeds 1 m/s.

Best regards,

Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793

----- Original Message -----
From: "Sim Aberson" <Sim.Aberson at noaa.gov>
To: gradsusr at gradsusr.org
Sent: Tuesday, April 20, 2010 9:06:52 AM
Subject: [gradsusr] GrADS default colors?


I am trying to make some plots in which streamlines are plotted only when the
magnitude of the wind is > a threshold, in this case 1 m/s.  I am using

'set clevs  0 1'
'set ccols  1 0'

My impression is that 1 is white and 0 is black.  When I make the plot, 1 is
white, and 0 is very light grey.  How do I make the streamlines black?

Thanks,
Sim


-- 
Sim Aberson         AOML/Hurricane Research Division          Miami, FL
      "Hurricane states erect statues in my honor." -- David Sedaris


_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr



More information about the gradsusr mailing list