X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 22 Apr 2014 02:17 PM by  anon
COLORBAR function problem
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
22 Apr 2014 02:17 PM
    In my code below, IDL is referring the COLORBAR function as undefined and I do not understand why the function is not being called when its proper syntax. Could someone point me in the right direction please? Thanks for the help! trmm_used *=3. for ilat=0, num_lat-1 do begin for ilon=0, num_lon-1 do begin values = trmm_used[ilon,ilat,*,0,*,*] values_list= where(values GE 0, amt) if amt ge 0 then begin rainfall_mean = mean(values[values_list]) monthly_rainfall[ilon,ilat] = rainfall_mean endif endfor endfor WINDOW, 3, XSIZE=900, YSIZE=900 LOADCT, 39, NCOLORS=20 DEVICE, DECOMPOSED=0 !P.COLOR=2 !P.BACKGROUND=255 ERASE, 255 MAP_SET, 0,0, /CYLINDRICAL, LIMIT=[LatMin, LonMin, LatMax, LonMax], $ POSITION=[.1,.1,.95,.95], /ISOTROPIC, /NOBORDER, /NOERASE, LONLAB=Longitude, $ LATLAB=Latitude, TITLE='January Rainfall' CONTOUR, LEVELS=findgen(20)*0.1, C_COLORS=indgen(20), monthly_rainfall, $ longitude[indices_lon], latitude[indices_lat], $ /OVERPLOT, /CELL_FILL, POSITION=[0.15,0.15,0.95,0.80] XCHAR=1 YCHAR=1 COLORBAR, RGB_TABLE=39, POSITION=[0.15,0.85,0.95,0.90], $ RANGE=[Min(monthly_rainfall), MAX(monthly_rainfall)], FORMAT='(F0.2)' MAP_CONTINENTS, /COASTS, /COUNTRIES, COLOR=0, THICK=1, /HIRES AXIS, XAXIS=0, XRANGE=[LonMin, LonMax], XSTYLE=1, COLOR=0, CHARSIZE=XCHAR, XTHICK=2, CHARTHICK=2, $ XTICKINTERVAL=1, XMINOR=4 AXIS, YAXIS=0, YRANGE=[LonMin, LonMax], YSTYLE=1, COLOR=0, CHARSIZE=YCHAR, YTHICK=2, CHARTHICK=2, $ YTICKINTERVAL=1, YMINOR=4 AXIS, XAXIS=1, XRANGE=[LonMin, LonMax], XSTYLE=1, COLOR=0, CHARSIZE=0.01, XTHICK=2, CHARTHICK=1, $ XTICKINTERVAL=1, XMINOR=4 AXIS, YAXIS=1, YRANGE=[LonMin, LonMax], YSTYLE=1, COLOR=0, CHARSIZE=0.01, YTHICK=2, CHARTHICK=1, $ YTICKINTERVAL=1, YMINOR=4 END

    Deleted User



    New Member


    Posts:
    New Member


    --
    23 Apr 2014 08:18 AM
    The name "colorbar" has been appropriated by IDL itself in IDL 8.x. Thus, any "colorbar" program you used in the past will no longer work in IDL 8. You will have to rename it. Or, more likely, you should update whatever library you are using that provided you with the "colorbar" routine, since all external library owners have had to rename a great many of their useful routines so they can co-exist with IDL 8. (This is the same reason, by the way, it is dangerous to use the word "image" in your code to describe an image variable. IDL 8 appropriated this name, too. Putting a compile_opt idl2 in your code will help.)
    You are not authorized to post a reply.