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

Home » Public Forums » archive » CONTOUR problem
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: Contour Problem [message #77036 is a reply to message #7115] Mon, 25 July 2011 11:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Alexa writes:

> I think this is probably a pretty easy problem but I could get help
> that'd be great.
>
> I'm making a contour plot and and I want to change the values of the
> axes so I'm doing
>
> x=[-6, 0]
> y=[-3, 1]
>
> Contour, x, y, z
>
> But I get an error that says that x and y need to be 2D arrays, but
> aren't those already 2D arrays? Do I have the syntax wrong?

Well, usually the syntax of the Contour plot is like this:

Contour, z, x, y

Maybe you want something like this:

s = Size(z, /Dimensions)
x = Scale_Vector(Findgen(s[0]), -6, 0)
y = Scale_Vector(Findgen(s[1]), -3, 1)
Contour, z, x, y

You can find Scale_Vector here:

http://www.idlcoyote.com/programs/scale_vector.pro

You might need other routines from the Coyote Library, too.
It is best to download the whole thing.

http://www.idlcoyote.com/code_tips/installcoyote.php

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Contour Problem
Next Topic: TIMEGEN bug (not the pre-6.4 bug that Fanning describes)

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

Current Time: Thu Oct 09 06:04:18 PDT 2025

Total time taken to generate the page: 1.44558 seconds