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.

有帮助吗?

解决方案

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.

其他提示

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;"]);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top