Re: Would like to represent Missing Values (of Vector Plot) as crosshatch or other pattern on graphics plot

From: Hobbs, Will R (3244-CalTech) <William.R.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 25 2010 - 19:44:23 MST

John

Have you checked the resource cnMissingValFillPattern? http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnMissingValFillPattern

If this resource is not recognised by vector plots (I haven't tried this), then you could use one of the gsn_csm_vector_scalar plot functions ( http://www.ncl.ucar.edu/Applications/vector.shtml), having created a dummy 'scalar' array using the 'where' function.

    e.g.

    dummy = where(ismissing(u).or.ismissing(v), 1, 0) ; all missing datapoints will be set to 1, 0 otherwise.

Then when you make your plot, set the cn resources accordingly:

    resc@cnLevelSelectionMode = "ExplicitLevels"
    resc@cnLevels = 1
    resc_at_cnFillPattern = (/6/) ;whatever fill pattern you want from http://www.ncl.ucar.edu/Document/Graphics/Images/fillpatterns.png

    plot = gsn_csm_vector_scalar_map_ce(wks, u, v, dummy, resc)

This should give you what you want (I think!). I hope this is clear, I know it's a rather brief description, and others may have some simpler ideas.

Will

On 1/25/10 4:01 PM, "McCormick.JohnW@epamail.epa.gov" <McCormick.JohnW@epamail.epa.gov> wrote:

I have attached a program that displays a vector plot for ocean currents (around the Northern Gulf off the coast of Louisiana). The files that I'm using contain substantial number of "Missing Values" and I would like to represent them as a different pattern and color (ie., crosshatch lines with, say, black color lines). I can do this with the color contour plots but cannot seem to find a way to do the same with vector plotting. Can you give me some hints or ideas as to how or what to code (in my ncl program) in order to represent these Missing Values as I have described?? I would appreciate any feedback or ideas very much. Thanks,

John McCormick

John W. McCormick, Systems Programmer / DBA
High Performance Computing & Scientific Visualization
Lockheed Martin Information Technology, Supporting the EPA
Research Triangle Park, NC
919-541-0890

Federal Infrastructure Contact - Ravi Nair
919-541-5467 - nair.ravi@epa.gov
Federal Infrastructure Contact - Joe Retzer, Ph.D.
919-541-4190 - retzer.joseph@epa.gov

############################################
### Work Information ###
############################################
John W. McCormick, Systems Programmer, MD: N127-01
Lockheed Martin, Contractor to US-EPA
US-EPA, Bldg NCC, Rm N135B
Durham, NC 27711
Office: 919-541-0890
Fax : 919-541-0056
Work Email: mccormick.johnw@epa.gov

**********************************************************
Will Hobbs, Ph.D. William.R.Hobbs@jpl.nasa.gov
Jet Propulsion Laboratory
4800 Oak Grove Dr. office: 300-324a
M/S 300-323 phone: (818) 354-0466
Pasadena, CA 91109 fax: (818) 354-0966
**********************************************************

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 25 19:44:30 2010

This archive was generated by hypermail 2.1.8 : Mon Feb 01 2010 - 08:05:34 MST