|
Re: how to over plot after using "cgZplot" [message #82687 is a reply to message #82686] |
Tue, 08 January 2013 10:26  |
abc
Messages: 46 Registered: March 2011
|
Member |
|
|
On Tuesday, January 8, 2013 6:51:09 PM UTC+1, idlhelp wrote:
> I have a small problem. My first plot work fine with cgZplot command but I want to overplot another plot on it. How can i do that. I am doing in the following way.
>
>
>
> cgZPlot,a,b,color='black'
>
> cgZPlot,c,d,color='red',/overplot
>
>
>
> but it doesn't work.
Thank David,
but getting this error while running your code
'Attempt to call undefined procedure/function: 'CGOVERPLOT__DEFINE'.
|
|
|
Re: how to over plot after using "cgZplot" [message #82689 is a reply to message #82687] |
Tue, 08 January 2013 10:10  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
idlhelp writes:
> I have a small problem. My first plot work fine with cgZplot command but I want to overplot another plot on it. How can i do that. I am doing in the following way.
>
> cgZPlot,a,b,color='black'
> cgZPlot,c,d,color='red',/overplot
>
> but it doesn't work.
I'd do it like this:
a = Indgen(101)
b = cgDemoData(17)
c = Indgen(101)
d = cgDemoData(17)
oplotObj = Obj_New('cgOverPlot', c, d, color='red')
cgZPlot, a, b, OPLOTS=oplotObj
Note, that if you are running IDL 8 and above, you can
create the oplotObj like this:
oplotObj = cgOverplot(c, d, color='red')
This is true of an Coyote Graphics object, such as cgMap, etc.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|