comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Legend creation on an image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Legend creation on an image [message #48905 is a reply to message #48904] Fri, 02 June 2006 15:14 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
elsueniero@gmail.com writes:

> I am trying to create a legend similar to the ones shown here:
> http://edcdaac.usgs.gov/modis/myd13a1v4.asp
>
> I already have my two vectors, one with the limits, and the other with
> the colors:
>
> ndvi_color_map_index = [-1.0,0.0,0.028571429,0.057142857,0.085714286, $
> 0.11428571,0.14285714,0.17142857,0.2, $
> 0.25,0.3,0.35,0.40,0.46666667,0.53333333,0.6,0.7,0.8,0.9]
>
> ndvi_color_map_colors = [[0,0,0],[0,24,104],[254,254,254], $
> [205,193,169],[199,186,169],[182,148,111],[170,129,75],[143, 115,65], $
> [128,105,35],[148,183,19],[116,171,5],[102,162,2],[81,150,0] ,$
> [62,129,0],[24,117,3],[1,92,13],[1,71,0],[5,56,5],[0,40,3],[ 2,16,0]]
>
> * note that n_elements(ndvi_color_map_index) + 1 ==
> n_elements(ndvi_color_map_colors)
> thats because all info bellow -1.0 should be black ([0,0,0]) and the
> same with all the info above 0.9
>
> I have both the floating point image in "NDVIfloat" and the 3-band
> color image in "NDVIcolor"
>
> Now what I need to do is to put on the lower-rigth 600x300 pixels of
> the NDVIcolor image a legend the shown. (the image is 1300x1900 and I
> now that those 600x300 is background)
>
> I know that with some for's I can put the colors bins, but how can I
> put text on an array from IDL?? Is that possible??

A colorbar with similar characteristics is described in this article:

http://www.dfanning.com/map_tips/precipmap.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: HELP!!!!! How to use IDL to create a move?
Next Topic: how to open three single-band files simultaneously

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 12:20:13 PDT 2025

Total time taken to generate the page: 0.00650 seconds