Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
gnuplot (Read 11927 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
gnuplot
29.08.10 at 13:22:57
 
gnuplot
 
Gnuplot is a free, command-driven, interactive, function and data plotting program.
 
There is a version for windows and linux. The windows version can be downloaded from http://downloads.sourceforge.net/gnuplot/gp424win32.zip
 
Unzip the zip file and run from the bin directory wgnuplot.exe
 
Tutorial:
http://www.duke.edu/~hpgavin/gnuplot.html
Back to top
 
« Last Edit: 29.08.10 at 13:44:19 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
gnuplot: visualise XYZ data
Reply #1 - 29.08.10 at 13:25:48
 
gnuplot: visualise XYZ data
 
To view 3D points, create a data file and use the splot function to view the points.
For example, save your points in a file called data.dat with the following contents:
 
# x y z
  0 0 0
  1 1 1
  2 1.5 0.

 
Start gnuplot and type:  
splot "data.dat"
 
There are various ways to view the plot.  
 
One way is with points. You need to run the command:
set style data points
 
Another way to view the points is using the tiny dots:
set style data points
Back to top
 
« Last Edit: 29.08.10 at 15:24:39 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
gnuplot: draw 3D planes
Reply #2 - 29.08.10 at 19:40:16
 
gnuplot: draw 3D planes
 
There are two ways to draw planes using gnuplot.  
 
  • The first method is to give an expression for z, e.g. to plot z=x+y the following command can be given:
    splot x+y
  • The second method is to give parameteric input (u and v are the parameters).  
    E.g. to plot the xy plane use the following command:
    splot u,v,0
    Plotting the yz plane use the following command:
    splot 0,u,v
    Plotting in one go the xy, yz and xz planes:
    splot u,v,0,  u,0,v,   0,u,v
Back to top
 
« Last Edit: 29.08.10 at 19:43:02 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
gnuplot: draw lines in 3D
Reply #3 - 29.08.10 at 19:58:25
 
gnuplot: draw lines in 3D
 
Lines can be drawn in 3D using splot. Using parameteric input the following commands draw a reference frame at x=0, 2, 4, 6 and 8
 
splot 0,0,v, 0,v,0, v,0,0
replot 2,0,v, 2,v,0, v+2,0,0
replot 4,0,v, 4,v,0, v+4,0,0
replot 6,0,v, 6,v,0, v+6,0,0
replot 8,0,v, 8,v,0, v+8,0,0
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
gnuplot: hide legend
Reply #4 - 29.08.10 at 20:44:47
 
gnuplot: hide legend
 
To hide the legend when printed, issue the following command:
set key off
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
gnuplot: drawing colors
Reply #5 - 29.08.10 at 20:47:03
 
gnuplot: drawing colors
 
There are a few ways in which colors can be specified. One is using named rgb colors. The example below plots a line  in gray50:
splot 0,0,v lt rgb "gray50"
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
gnuplot: 3D: set intersection z-axis and xy plane
Reply #6 - 25.09.10 at 19:49:04
 
gnuplot: 3D: set intersection z-axis and xy plane
 
In the 3D graph (splot) the xy plane does usually not intersect the z-axis at 0. You can set this point using the ticslevel option. The following command sets the intersection point at z=0
 
set ticslevel 0
 
Source:
http://t16web.lanl.gov/Kawano/gnuplot/plot3d-e.html#6.1
Back to top
 
« Last Edit: 25.09.10 at 19:49:29 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
gnuplot: pause
Reply #7 - 17.11.12 at 23:09:07
 
gnuplot: pause
 
To pause the gnuplot session you can use the pause command. Useful when running it as a script and to stop it while it is displaying the results:
 
>gnuplot myscript.plt
 
myscript.plt:
plot "DOSS.DAT" using 1:2;
pause -1 "Hit any key to close";
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1