Help overplotting contours and surface

  • Follow


Disclaimer: This is a homework problem, but I'm completely stumped.

I'm supposed to generate two plot panels in one window. The first
panel combines a fill and contour, the second contains a surface and
contour. My code is as follows:

; Set up the data for the plots
z = SHIFT(DIST(50), 25, 15)
z = EXP(-(z/15)^2)

; Set up 2 columns and 1 row for graphs
!P.MULTI = [0, 2, 1]
; Overplot contours
CONTOUR, Z, /FILL, NLEVELS = 7
CONTOUR, Z, /FOLLOW, NLEVELS = 7, /OVERPLOT

; Overplot contour and surface
SURFR
CONTOUR, Z, /T3D, ZVALUE = 0, /FILL, NLEVELS = 7
SURFACE, Z, /NOERASE
!P.MULTI = 0


My issue is that the third contour is overplotted over the first two
contours. If I reverse the order of the lines to plot the third
contour and the surface, then the surface is overimposed on the
contour (looks horrible, not like a single graph at all). If I just
plot the third contour and surface, it works great.

How can I specify for that third contour to plot in the second panel,
and the surface right under it?

Many thanks.
0
Reply chemical.rivas (1) 5/30/2010 9:12:43 PM

On Sun, 30 May 2010 14:12:43 -0700 (PDT), Virgil
<chemical.rivas@gmail.com> wrote:

>How can I specify for that third contour to plot in the second panel,
>and the surface right under it?

I think the SAVE keyword to SURFACE is used for this. From the help:

SURFACE, Z, /SAVE 
CONTOUR, Z, /NOERASE, /T3D , ZVALUE=...
0
Reply Wox 5/31/2010 12:03:02 PM


On May 31, 5:03=A0am, Wox <s...@nomail.com> wrote:
> On Sun, 30 May 2010 14:12:43 -0700 (PDT), Virgil
>
> <chemical.ri...@gmail.com> wrote:
> >How can I specify for that third contour to plot in the second panel,
> >and the surface right under it?
>
> I think the SAVE keyword to SURFACE is used for this. From the help:
>
> SURFACE, Z, /SAVE
> CONTOUR, Z, /NOERASE, /T3D , ZVALUE=3D...

Thanks for your response. However, if I graph the surface before the
contour, the contour you cannot see the surface well. The contour
needs to be plotted before the surface.
0
Reply Virgil 5/31/2010 4:05:32 PM

On May 31, 5:03=A0am, Wox <s...@nomail.com> wrote:
> On Sun, 30 May 2010 14:12:43 -0700 (PDT), Virgil
>
> <chemical.ri...@gmail.com> wrote:
> >How can I specify for that third contour to plot in the second panel,
> >and the surface right under it?
>
> I think the SAVE keyword to SURFACE is used for this. From the help:
>
> SURFACE, Z, /SAVE
> CONTOUR, Z, /NOERASE, /T3D , ZVALUE=3D...

How could we do similar with shade_surfe?
shade_surf,Z
0
Reply Dave 6/1/2010 9:12:07 AM

How about this:

; Set up the data for the plots
z = SHIFT(DIST(50), 25, 15)
z = EXP(-(z/15)^2)

; Set up 2 columns and 1 row for graphs
!P.MULTI = [0, 2, 1]
; Overplot contours
CONTOUR, Z, /FILL, NLEVELS = 7
CONTOUR, Z, /FOLLOW, NLEVELS = 7, /OVERPLOT

; Overplot contour and surface
surfr
CONTOUR, Z, /T3D, ZVALUE = 0, /FILL, NLEVELS = 7
!P.MULTI[0]=1
SURFACE, Z, /NOERASE, /T3D

!P.MULTI = 0
0
Reply Wox 6/3/2010 8:41:36 AM

On Tue, 1 Jun 2010 02:12:07 -0700 (PDT), Dave Poreh
<d.poreh@gmail.com> wrote:

>How could we do similar with shade_surf?

I'm not sure you can. I'd go for object graphics.
0
Reply Wox 6/3/2010 8:48:19 AM

5 Replies
737 Views

(page loaded in 0.077 seconds)

Similiar Articles:













7/22/2012 12:25:38 AM


Reply: