contour/surface 3D plots with data

contour/surface 3D plots with data

Post by jeremit » Fri, 16 Dec 2005 05:58:33


I have a text file with the data I want to plot in 3D. The default for
this is to use points. I don't want points, I want gnuplot to make a
surface out of my data. I tried looking at the surface and contour
options, but I don't think I understand how to do it with discrete data
points. There are lots of examples of how to do this with functions,
but I haven't found any for use with data points. Can someone help an
up and coming gnuplot user?
Thanks,
Jeremy
 
 
 

contour/surface 3D plots with data

Post by Theo Hopma » Fri, 16 Dec 2005 06:52:37


Does your data file have grid structure? Read `help grid_data` if this
doesn't mean anything. If your data does have grid structure, then
something as simple as

splot 'datafile' with lines

should do the trick, giving you a mesh of lines.

If your data does not have grid structure, i.e., is just a bunch of
points in 3-space with no particular order, then `set dgrid3d` might be
useful. Do `help dgrid3d`.

THeo

 
 
 

contour/surface 3D plots with data

Post by jeremit » Fri, 16 Dec 2005 10:44:26

Theo,
Thanks, that helps. Now I need help getting the colors right. My data
is all much smaller than 1 so I am plotting the z-axis on a logscale.
However, it seems the colors used is still on a linear scale. How can
I change this so my plot isn't all black?
Thanks,
Jeremy
 
 
 

contour/surface 3D plots with data

Post by Hans-Bernh » Fri, 16 Dec 2005 18:55:27


That reasoning is flawed. Just because the data values are small
doesn't mean that plotting them on a log scale is a good idea.


The colors used are on *no* particular scale at all, by these
commands. The lines making up the plot will be drawn in some line
type, whose exact meaning depends on the choice of terminal driver.
What made you think otherwise?


Choose a coloured output format?

--
Hans-Bernhard Broeker ( XXXX@XXXXX.COM )
Even if all the snow were burnt, ashes would remain.
 
 
 

contour/surface 3D plots with data

Post by jeremit » Sat, 17 Dec 2005 01:01:22

I think I didn't state my problem correctly. I am plotting on a log
scale, because it is easier to see the features of the plot that way.
My plot is black, not because it is a black and white plot, but because
most of the data is on the low end of the spectrum which is colored
black. I don't mind the low end being black, I just want there to be
more of a difference between 1e-8 and 1e-6 so I can see a color
difference. Does that make sense?
Thanks,
Jeremy
 
 
 

contour/surface 3D plots with data

Post by Olaf Schul » Sat, 17 Dec 2005 01:36:23


set log cb

In some versions this is not stored during save... it's a known bug an fixed
in the cvs-version.

Olaf

PS. For some examples of pm3d please look at www.enydralutris.de/Fahrrad
Gonionmeter/ (Thanks to gnuplot 4.0:-)
 
 
 

contour/surface 3D plots with data

Post by jeremit » Sat, 17 Dec 2005 02:01:37

Olaf,
Thanks; that did the trick. Now I just have to play with the options
to get it to look "perfect". By the way, the link to your website
doesn't work. My browser says it can't find enydralutris.de.
THanks,
Jeremy
 
 
 

contour/surface 3D plots with data

Post by Olaf Schul » Sat, 17 Dec 2005 06:16:46


sorry enhydralutris.de

Olaf