I tried reproducing an image showing intensity distribution of transverse electromagnetic (TEM) modes with parameters m and n. I have used a 4x4 multiplot matrix of surface plots. The result is satisfying for me. Just for the sake of completeness:
- How would you add the axes instead of having a separate title for each single plot?
- Is there a way to display the isolines on the surface only in one direction like in the original image?
- The original author has left out the lower part of the multiplot to underline the symmetry. I am not sure whether this really makes the point clear. Should I rather just show the full matrix or can you think of a better way?
Solution
Thanks everybody. With your suggestions I now have the following picture:
Which is output from the Qt terminal for the following code:
m=n=3 # max. 3
THETA=2.5
set hidden3d trianglepattern 2
set isosamples 50
set xrange [-THETA:THETA]
set yrange [-THETA:THETA]
set view 70,55,,.5
unset border
unset key
unset tics
H0(x)=1
H1(x)=2*x
H2(x)=4*x**2-2
H3(x)=8*x**3-12*x
set multiplot layout n+1,m+1 upwards margins .14,.9,.14,.9 spacing .05 \
title 'Intensitätsverteilungen der Laguerre-Gauß-Moden' font ",16"
do for [i=0:n] for [j=0:m] {
eval sprintf("splot (H%d(sqrt(2)*y)*exp(-y**2))**2\
* (H%d(sqrt(2)*x)*exp(-x**2))**2\
with lines lc %d", i, j, abs(i-j)+1)
}
set origin 0,0
set size 1,1
unset margins
set title ' '
set arrow from 0,-.5 to graph 1,0
set arrow from -.5,0 to graph 0,1
set label at .5, .5 "dreh-\nsymmetrisch" center rotate by -37
set arrow from .7,0 to .1,.6
set tics out nomirror
set xtics 0, 1, n
set ytics 0, 1, m
set xrange [-.5:n+.5]
set yrange [-.5:m+.5]
set xlabel offset graph .5,0 "n"
set ylabel offset graph 0,.5 "m" norotate
plot NaN
unset multiplot
- Instead of adding the axes manually, I plotted an aptly scaled 2D plot atop. Thus the axes scale for parameters m and n other than 3. For supporting higher orders one has to add according Hermite polynomials Hn(x); n=1, 2, 3, ... and may need to adjust the margins of the multiplot.
- Supplying
set hidden3d trianglepattern 2proved to be the easiest way to have the isolines display in only one direction. - The colors should help making out pairs of rotational symmetric figures. One may argue the aesthetics, but the message hopefully gets conveyed.




The first plot object takes care of the hidden part and is just white. The second plot object has black lines; the division with
set hidden3d trianglepattern 2andset isosamples 50. - GRSousaJr