Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating 3D Surface Plots From a Series of 2D Graphs

22 views
Skip to first unread message

Frederick Brown

unread,
May 4, 2014, 4:10:16 AM5/4/14
to
Hi,

I'd like to create a smoothed 3D surface plot from a series of 2d graphs.

Here is a link to a 2d graph that shows a number of line graphs.

http://i.imgur.com/a2AUGFb.png

Each line graph has a unique and constant z coordinate. I want to use these to create a nifty looking 3d surface graph. There will be more line graphs than are shown here to complete the surface.

I have scidavis, octave, and gnuplot, and have used them a little bit, scidavis the most because it's so quick and easy for 2d stuff. Any ideas as to how I could accomplish this 3D plot?

Best regards,

Fred B

Karl

unread,
May 4, 2014, 6:53:48 AM5/4/14
to
Hi Fred,

just write all 2D datasets to a single file, with a blank line
between each, so pm3d knows knows how to construct the grid.

Then

splot "fname" using 1:(column(-1)*z_increment):2 with pm3d

for explanations see

help pseudocolumn
help pm3d

I your 2D datasets don�t have the same number of points (or they�re
not sampled evenly), pm3d�s "interpolate" option might be of interest.

Karl

Frederick Brown

unread,
May 5, 2014, 12:30:03 PM5/5/14
to
Hi Karl,

Thanks, that worked like a charm.

http://i.imgur.com/AZJxAsR.png

Now just to remember out how to label the axes properly. It been a while since I used gnuplot.

Best regards,

Fred

Frederick Brown

unread,
May 5, 2014, 2:14:38 PM5/5/14
to
On Sunday, May 4, 2014 4:10:16 AM UTC-4, Frederick Brown wrote:
Yep, I can definately work with that!

http://i.imgur.com/d6xcll5.png

:)
0 new messages