Re: Need help producing scatterplot over a map background, with marke r color set by point value...

From: Dennis Shea (shea AT XXXXXX)
Date: Sun Dec 12 2004 - 14:36:40 MST


Are these random pts or are they gridded data that were
put onto 1D arrays?

If the latter, u could [possibly] use the function "triple2grid"
to transform to a grid and then contour the grid using

pick, say, gui_default color map or make your own

res@cnRasterModeOn=True ; use raster mode
    gsnSpreadColors=True
    cnLevelSelectionMode="ManualLevels"
    cnMinLevelValF = 1.0
    cnMaxLevelValF = 10.0
    cnMaxLevelSpacingF= 1.0

---
random

rather than loop over each point [very inefficient]

I would use NCL "ind" function. [learn to use this]

cols = (/"blue", ... , "red"/)

do n=1,9 i = ind(radar.ge.1 .and. radar.lt.(n+1.)) if (.not.ismissing(i)) then txtres@txFontColor = cols(n-1) text = gsn_add_text(wks, plot, "." , blon(i), blat(i), txtres) delete(i) end if end do

Not sure why u r using gsn_add_text rather than gsn_add_polymarker.

good luck D

On Sun, 12 Dec 2004, John Filipkowski wrote:

> > Hi all, > > First, many thanks for the help I've received in the past. > > I'm trying to plot radar intensities on a map. The data > is supplied as 3 1-D arrays: latitudes, longitudes, and intensity values (0 > - 10 relative units). > > The following code snippet should illustrate what I'm trying to do... > After plotting a map, I plot the radar points, color-coded by relative > intensity, > using a do-loop: (some code below is omitted for clarity)... > > Data: > lat 1-D array (NUMPT) > lon " > radar " > > do i = 0, NUMPT -1 > > blon = lon(i) > blat = lat(i) > > val = radar(i) > > if( val .gt. 3.98 ) then > txtres@txFontColor = (/"red"/) > else > if ... etc... Set marker color by relative radar intensity value... > > end if > text = gsn_add_text(wks, plot, "." , blon, blat, txtres) > > end do > > I'm finding for 1-D arrays of 40 - 50,000 points, the Linux system I'm using > takes upwards of 30 minutes to produce a plot. I'm trying to find a better > way to do this through Google searches, but I keep running into dead links, > etc. > > Can anyone suggest a simpler, faster, alternative? > > Thanks again... > > > The information contained in this e-mail is intended only for the individual or entity to whom it is addressed. > Its contents (including any attachments) may contain confidential and/or privileged information. > If you are not an intended recipient you must not use, disclose, disseminate, copy or print its contents. > If you receive this e-mail in error, please notify the sender by reply e-mail and delete and destroy the message. _______________________________________________ ncl-talk mailing list ncl-talk AT ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Mon Dec 13 2004 - 08:01:12 MST