Contents Previous Next avsurface

Creating Surface Plots
Syntax avsurface(plotNamecolor source)

Creates a Data Visualizer surface plot of the data set specified by the character row vector color source. The character row vector plotName specifies the name of the group in which the surface graph object is created. If the value of plotName is "/" then the graph is created in the root directory, otherwise the value of plotName must be a valid group name such as "/SurfacePlots".

If at the O-Matrix prompt you enter
     avput({[1, 2], [3, 4]}, "/x")
     avsurface("/SurfacePlots", "/x");
The Data Visualizer will create the following graph

Once you have created, and possibly edited a graph you can update the display by modifying its referenced data either interactively with the previewer, or with the avput command. This enables the creation of animations and iterative data analysis. If you run the following script
# total time, g(t1, t2) is "small" for |(t1, t2)| > T / 2
T = 4.   
N = 512
dt = T / N       
df = 1 / T       
t = (seq(N) - N / 2 - 1) * dt 
alpha = 5. 
h = exp( - alpha * abs(t)) 
g = fillcols(h, N) % fillrows(h', N) 
# the continuous transform of g(t1, t2) is given by
# G(f1, f2) = H(f1) * H(f2)
# where H(f) = 2 * alpha / ((2 * PI * f)^2 + alpha^2)
# is the discrete transform of g
G = real(fft2d(complex(g))) * dt * dt 

D = maxs(G) - mins(G)
pPath = "/O-Matrix Surface/"
avput(log(G), [pPath,"log(G)"])
avsurface([pPath,"Log 2D fft"], [pPath,"log(G)"])
for i = 1 to 6 begin
     M = log(G) + (rand(N,N)*i)/5.
     avput(M, [pPath,"log(G)"])
     avpath(["graph:",pPath,"Log 2D fft"])

O-Matrix will create an animation of the 2-D FFT plot that concludes with the following graph.