octave-online / octave-online-server

The infrastructure that powers Octave Online, octave-online.net
GNU Affero General Public License v3.0
322 stars 75 forks source link

(Octave Online) Problem with 3D graphs #77

Open nojvspine opened 1 year ago

nojvspine commented 1 year ago

When trying to plot a 3D graph with mesh() or plot3(), it gives the error:

error: __gnuplot_draw_axes__: gnuplot (as of v4.2) only supports 3-D filled triangular patches
error: called from
    __gnuplot_draw_axes__ at line 773 column 19
    __gnuplot_draw_figure__ at line 169 column 17
    __gnuplot_drawnow__>__gnuplot_draw_to_file__ at line 123 column 9
    __gnuplot_drawnow__ at line 82 column 7

I tried examples from octave docs:

tx = ty = linspace (-8, 8, 41)';
[xx, yy] = meshgrid (tx, ty);
r = sqrt (xx .^ 2 + yy .^ 2) + eps;
tz = sin (r) ./ r;
mesh (tx, ty, tz);
t = 0:0.1:10*pi;
r = linspace (0, 1, numel (t));
z = linspace (0, 1, numel (t));
plot3 (r.*sin(t), r.*cos(t), z);

And results: image image

akirataguchi115 commented 11 months ago

image Both examples work fine for me.