how to plot the data of a 2D array with Z values as color [message #70123] |
Thu, 18 March 2010 09:33  |
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  |
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  |
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  |
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
|
|
|