Hey im trying to plot a miller cylindrical projection and get it to be blocky like this
http://www.idlcoyote.com/...ips/usegriddata.html
if you go there and look at his GridData Nearest neighbor plot. THAT is exactly how im trying to plot mine (except over a miller cylindrical) I cant use his code since he is using coyote graphics, and my office doesnt. Here is my code
file1=ncdf_open('tnmin_hadex_1961_1990.nc') ;opening
file ncdf_varget,file1,'tnmin',tnmin ;getting variables
ncdf_varget,file1,'lon',lon ncdf_varget,file1,'lat',lat
ncdf_close,file1 tnmin=[tnmin,tnmin[0,*]] ;adding data to complete 360 degrees
lon=[lon,360]
missing = Where(tnmin EQ -999.99, count)
IF count GT 0 THEN BEGIN
tnmin[missing] = !Values.F_NAN
ENDIF
arr=bytarr(3,256) ;custom color bar
i2=0
for i=255,0,-1 do begin
i2=i2+0.5
i3=i2/4
i4=i2/2
arr(0,255-i)=255
arr(1,255-i)=225-i2-i4
arr(2,255-i)=0
endfor
ysize = Size(lat, /DIMENSION)
xsize = Size(lon, /DIMENSION)
lats = Rebin(Reform(lat, 1, ysize), xsize, ysize)
lons = Rebin(lon, xsize, ysize)
lats=-lats ; lats were upside down
Triangulate,lons,lats, tri
g1 = GRIDDATA(lons,lats,tnmin,/nearest_neighbor,$ triangles=tri,dimension=[97,73],MISSING=!Values.F_NAN)
c1 = contour(g1,lon,lat,grid_units=2,$ rgb_table=arr,/fill,n_levels=8,/overplot, $ TITLE='tnmin hadex from 1961-1990')
cb=colorbar(target=c1,n_levels=8,position=[0.125,0.1,0.94,0.13])
m=mapcontinents()
grid=m.mapgrid
grid.label_position=0
grid.linestyle=' '
grid.yposition=0
end
Am i not suppose to use the contour call?
Everything gets contoured when i want it to remain blocky/pixelated