Question

I have a 1-dimensional list x in Maxima with 16 different elements, and plotted every possible product of two elements as a 3D plot:

g(u,v) := float('x[round(u)]*'x[round(v)]);
plot3d(g(u,v),[u,1,16],[v,1,16],[grid,15,15]);

Which yields this result:

http://i.stack.imgur.com/uKwfe.png

My desired result is having only the contour lines, i.e. the mesh. I don't want the coloured surface.

This seems like a trivial task, but the manual is very unclear on this. It says that usually, you already have only the mesh, but this isn't the case.

Using wxMaxima 12.04.0 on Windows.

Was it helpful?

Solution

Looks like the key is to get the Gnuplot output file to contain the line

set style data lines

Maxima has its own idea about "set style ..." which you can see by

set_plot_option ([plot_format, gnuplot]);

and then inspecting the output file ($HOME/maxout.gnuplot by default). I don't know how to convince Maxima to output a different style command. As a last resort you could edit maxout.gnuplot by hand.

OTHER TIPS

g(u,v) := float('x[round(u)]*'x[round(v)]);
plot3d(g(u,v),[u,1,16],[v,1,16],[grid,15,15], [palette, false]);

The [palette, false] option turns off surface coloring and draws only the mesh. But you'll still get hidden line removal, which Maxima automatically turns on.

To get a transparent wire mesh, do this:

plot3d(g(u,v),[u,1,16],[v,1,16],[grid,15,15],  [palette, false], 
[gnuplot_postamble, "unset hidden3d;"]);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top