> 
with(plots): with(plottools): #plots:setoptions(size=[250,250]);

> 
N:=50: M:=Matrix(N,N,(i,j)>evalhf(sin(i*2*Pi/N)*(jN/2)), datatype=float[8]):

> 
# By default, listdensityplot has tickmarks aligned with the middle # or Matrix column or rowvalues A:=listdensityplot(M, colorstyle=HUE, thickness=0, style=surface): A;

> 
# 2D coordinate transformation of above plot A f:=transform( (x,y)>[2*x+1,y3] ): T:=display(f(A), axes=frame, gridlines=false): T;

> 
#display(Array([A, T]));

> 
# 3dimensionsional, with forced orientation. # Note the 3D zhue shading goes from magenta to red, thus not a true match! # Offsets of 0.5 are used, to get same midpoint alignment. # Note the color interpolation during rendering, smoother than above. a,b,c,d:=(0.5)*2+1,(N+0.5)*2+1,(0.5)3,(N+0.5)3: CL:=plots:surfdata(M, a..b, c..d, shading=zhue, style=patchnogrid, orientation=[90,0,0], lightmodel=none): CL;

> 
# 2dimensionsional (Maple 18), producing a densityplot structure, # but with finer control over the color shading. # Note that this scheme hits red at both extremes, 0 and 1, matching # listdensityplot HUE shading. # Same offsets of 0.5 as above are used. # Note the smoother color interpolation during rendering. a,b,c,d:=(0.5)*2+1,(N+0.5)*2+1,(0.5)3,(N+0.5)3: col:=["red","magenta","blue","cyan","green","yellow","red"]: m:=[seq(i,i=0..nops(col)1)]/(nops(col)1.0): R:=plots:surfdata(M, a..b, c..d, dimension=2, axes=frame, style=patchnogrid, colorscheme=["zgradient",col,markers=m]): R;

> 
#display(Array([T, R, CL]));

