X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 19 Sep 2011 07:15 PM by  anon
using TV to map image
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
19 Sep 2011 07:15 PM
    map_set,xmargin=5,ymargin=5,/miller_cylindrical,/noerase scaledData = BytScl(tnmax3,top=18,MIN=minvalue, max=maxvalue,/nan) DEVICE, DECOMPOSED = 0 loadct, 3, ncolors=22 ;TVLCT, R,G,B,255 ,/get result=map_image(scaledData,startx,starty,compress=1,$ min_value=minvalue, missing=255) scaledData[missing]=255 tv, result, 0,starty There part of my code. What is happening is the scaled data does not seem to match up with the projected image. if i remove the margins, the map ALMOST fits, but i need to add the margins so i can add a header and colorbar. Why is it not scaling properly? whes the margins are put in, in scales slightly, but not as much as the projected map does. Any ideas?

    Deleted User



    New Member


    Posts:
    New Member


    --
    20 Sep 2011 10:06 AM
    Hi Albert, I was trying to execute your code to have a visual image of what you want, but I realised that the value of a variable is missing, i.e tnmax3. minvalue and maxvalue. Cheers, fernando

    Deleted User



    New Member


    Posts:
    New Member


    --
    20 Sep 2011 12:45 PM
    Hi, yeah, tnmax3 is coming from a .nc file. and max and min are just calculated from the orginaly tnmax variable file1=ncdf_open('tnmax_hadex_1961_1990.nc') ncdf_varget,file1,'tnmax',tnmax ncdf_varget,file1,'lon',lon ncdf_varget,file1,'lat',lat ncdf_close,file1 minvalue = Floor(Min(tnmax3, /NAN)) maxvalue = Ceil(Max(tnmax3, /NAN)) the 3 at the end of tnmax is me just manipulating it and reorganizing the data. If you need an idea of what is happening is, im using the scaled data to plot over top of my cylindrical projection, but since the projection opens a window and fills it completely there was no room for color bar or header. So i added xmargin and ymargin, but what is happening is, since im adding margins the cylindrical projection shrinks in size, and the scaleddata seems to only be scaling by maybe 1/2 of what the cylindrical projection is shrinking to. So now my data no longer lines up, or fit at all to my projection. Thanks for anyhelp you can give me. Albert
    You are not authorized to post a reply.