Operating at the pixel level with a PNG or x11 [SEC=UNCLASSIFIED]

From: Griffith Young <G.Young_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 09 2012 - 20:42:16 MST

Hello NCL-Talk,
        I might be using the wrong tool, but ...

        Is it possible to plot individual pixels in a PNG?

        Something like:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"

reg=addfile("regional_quarter_grid.nc", "r")
n_lat = dimsizes(reg->land&lat)
n_lon = dimsizes(reg->land&lon)
png="png"
png@wkHeight=n_lat
png@wkWidth=n_lon
wks = gsn_open_wks(png, "land")
do lat = 0, n_lat - 1
  do lon = 0, n_lon - 1
    if (reg->land(lat, lon) .eq. 1) then
      Function_I_Am_Looking_For_To_Set_Pixel(wks, lat, lon)
    end if
  end do
end do

        Or maybe there is something that already does this?

Thanks in advance,
        Griff Young.
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 9 20:42:28 2012

This archive was generated by hypermail 2.1.8 : Fri Feb 17 2012 - 08:50:10 MST