help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnuplot in Octave review


From: Petr Mikulik
Subject: Re: gnuplot in Octave review
Date: Wed, 11 Feb 2009 18:48:51 +0100 (CET)

> > Gnuplot is not a tool for 3D scene modelling. It has indeed some other
> > limitations. However, many properties changed in recent years. Which
> > "complex 3d plotting" does not it support? Can you give examples? You are
> > welcome to contribute to both sides, Octave as well as gnuplot.
>
> it also had problems, with rending multiple 3d surfaces and which surface 
> should be visible and which not

"hidden3d" in gnuplot works OK for line graphics. "set pm3d depthorder" 
should work for faceted surfaces but may produce artefact on intersections 
of large facets

> Unless it's changed recently, gnuplot doesn't do lighting and
> shading...

Support for "shading interp" was added recently with a collaboration on both 
Octave and gnuplot sides.

Lighting (or other "scene modelling" features) is not available in gnuplot.

> that has changed recently too. It also seems a little slow to me when
> trying to render surfaces at high resolution (e.g. 100x100 meshgrid),
> especially noticeable when trying to rotate said surface.

Yes, meshgrid is slow, however, "imagesc" is fast even for 1024x1024 
images.

> Not to mention that its output is ugly compared to OpenGL:
>      http://platinum.linux.pl/~jordi/piccies/gnuplot-vs-octaviz.png

But this comparison is completely wrong -- it is comparing two different 
meshes! The OpenGL corresponds to "shading interp", while that of gnuplot is 
"shading faceted". Therefore, the vtk_surf() command presented there is 
incompatible to Matlab and Octave. The mesh produced by Octave's surf() via 
gnuplot is correct! It's vtk_surf() which needs to be fixed.

If you wish to see a plot similar to that smooth one in that URL, you need 
to say
        shading interp
Comparing these plots drawn by Matlab and Octave+gnuplot, they are almost 
identical. I would only recommend to Octave to add the following gnuplot
options:
        set xtics out nomirror scale 1.5
        set ytics out nomirror scale 1.5
        set ztics out nomirror scale 1.5

> Something I would like some day in Octave (I know, I know, "show us
> the code") is something like Matlab's movie-making abilities. I think
> gnuplot is a bit limited for that purpose. Right now I generate
> individual frames and stitch them together with mplayer or ffmpeg.

Your solution is correct and it shows that movie making does not need to be 
the job of gnuplot.

> There's nothing wrong with gnuplot other than its funny name and that
> it doesn't do everything we want it to do. It's otherwise a fine piece
> of software. :-)

Personally I use only 2D plots and maps via imagesc, there everything works 
fast and OK. If you wish some other features N/A in Octave or gnuplot, you 
are welcome to contribute.

---
P.M.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]