Re: Newbie question - showing grid [message #10926] |
Tue, 03 February 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Jeff (jeffe@fl.ensco.com) writes:
> One item that some of my peers here want is the ability to
> see the actual grid values.(i.e. a shaded representation is fine)
> They like the contours but they would also like the ability to view
> the raw regularly spaced grid or the points for the irregular
> spaced grid.
>
> Are there any IDL functions that do this.
> I would appreciate any pointers.
If I wanted to see a shaded surface representation of my
data and I wanted to view the grid lines, I might draw the
grid lines right on the shade plot, by doing something like
this:
a=Shift(Dist(30), 20, 15)
peak = Exp(-(a/15)^2)
y = Findgen(30)
x = RandomU(seed, 30) * 30
x = x(Sort(x))
Shade_Surf, peak, x, y
Surface, peak, x, y, XStyle=4, YStyle=4, ZStyle=4, /NoErase
If I wanted to show the contours, but also put in the grid
lines, I would have to go to a bit more trouble, because
IDL only draws grid lines at tick locations. I could try
something like this:
Contour, peak, x, y, /Follow, NLevels=12
FOR j=0, N_Elements(x)-1 DO PlotS, [x[j],x[j]], !Y.CRange, $
LineStyle=2
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|