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

Home » Public Forums » archive » how to plot the data of a 2D array with Z values as color
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
how to plot the data of a 2D array with Z values as color [message #70123] Thu, 18 March 2010 09:33 Go to next message
clément mayet is currently offline  clément mayet
Messages: 8
Registered: March 2010
Junior Member
Hi all,

I would like to plot a map from a twoD array. My array contains Z
values and the X,Y index corresponds to latitude/longitude. I use the
CONTOUR procedure like this:

MAP_SET,/MERCATOR, /GRID, /NOERASE, /ISOTROPIC, LIMIT=limit
CONTOUR, Z, lon, lat

My question is : is there a simplest way to do that ( I mean directly
associate a color to the Zvalue, without calculating the contours,
which can be quite long for large arrays)

Thanks for your help
Re: how to plot the data of a 2D array with Z values as color [message #70189 is a reply to message #70123] Mon, 22 March 2010 09:52 Go to previous message
mankoff is currently offline  mankoff
Messages: 131
Registered: March 2004
Senior Member
On Mar 22, 8:40 am, clément mayet <cma...@gmail.com> wrote:
> On 18 mar, 21:03, Gray <grayliketheco...@gmail.com> wrote:
>
>
>
>> On Mar 18, 12:33 pm, clément mayet <cma...@gmail.com> wrote:
>
>>> Hi all,
>
>>> I would like to plot a map from a twoD array.   My array contains Z
>>> values and the X,Y index corresponds to latitude/longitude. I use the
>>> CONTOUR procedure like this:
>
>>> MAP_SET,/MERCATOR, /GRID, /NOERASE, /ISOTROPIC,  LIMIT=limit
>>> CONTOUR, Z, lon, lat
>
>>> My question is : is there a simplest way to do that ( I mean directly
>>> associate a color to the Zvalue, without calculating the contours,
>>> which can be quite long  for large arrays)
>
>>> Thanks for your help
>
>> I'd check this out:http://www.dfanning.com/graphics_tips/coloredline.html
>
> Thank you for your answer, even if that's not really what I was
> looking for. I've found the solution using MAP_IMAGE and TVSCL.

CONTOUR also has /FILL but I'd do MAP_IMAGE as /FILL is equivalent to
FLOOR().

-k.
Re: how to plot the data of a 2D array with Z values as color [message #70193 is a reply to message #70123] Mon, 22 March 2010 05:40 Go to previous message
clément mayet is currently offline  clément mayet
Messages: 8
Registered: March 2010
Junior Member
On 18 mar, 21:03, Gray <grayliketheco...@gmail.com> wrote:
> On Mar 18, 12:33 pm, clément mayet <cma...@gmail.com> wrote:
>
>> Hi all,
>
>> I would like to plot a map from a twoD array.   My array contains Z
>> values and the X,Y index corresponds to latitude/longitude. I use the
>> CONTOUR procedure like this:
>
>> MAP_SET,/MERCATOR, /GRID, /NOERASE, /ISOTROPIC,  LIMIT=limit
>> CONTOUR, Z, lon, lat
>
>> My question is : is there a simplest way to do that ( I mean directly
>> associate a color to the Zvalue, without calculating the contours,
>> which can be quite long  for large arrays)
>
>> Thanks for your help
>
> I'd check this out:http://www.dfanning.com/graphics_tips/coloredline.html

Thank you for your answer, even if that's not really what I was
looking for. I've found the solution using MAP_IMAGE and TVSCL.
Re: how to plot the data of a 2D array with Z values as color [message #70215 is a reply to message #70123] Thu, 18 March 2010 13:03 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Mar 18, 12:33 pm, clément mayet <cma...@gmail.com> wrote:
> Hi all,
>
> I would like to plot a map from a twoD array.   My array contains Z
> values and the X,Y index corresponds to latitude/longitude. I use the
> CONTOUR procedure like this:
>
> MAP_SET,/MERCATOR, /GRID, /NOERASE, /ISOTROPIC,  LIMIT=limit
> CONTOUR, Z, lon, lat
>
> My question is : is there a simplest way to do that ( I mean directly
> associate a color to the Zvalue, without calculating the contours,
> which can be quite long  for large arrays)
>
> Thanks for your help

I'd check this out: http://www.dfanning.com/graphics_tips/coloredline.html
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: to convert pixel numbers into wavelength
Next Topic: What's Up with ITTVIS?

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

Current Time: Wed Oct 08 15:16:59 PDT 2025

Total time taken to generate the page: 0.00667 seconds