TUCOWS NETWORK

   LINUXBERG | TUCOWS | FREETHEMES | GAMINGPLACE | eBarn | PDA Central | HOME

HOW TO - Home

Click here!

What's new About Us Contact Us Advertise



Welcome to HowTo! The premier Linux information resource center.
____________________________________

H HOWTO 's 

html'd
(HOWTOs in html)
plain text
(HOWTOs in plain text for printing)
html'd
(Mini-HOWTOs)
plain text
(Mini-HOWTOs)


LDP Additions
(Latest from LDP)
Other Formats
(LDP Other Formats)
Translations
(LDP Other Languages)
Unmaintained
(LDP Unmaintained)


Contrib
(Submitted Documentation)
FAQ
(Frequently Asked Questions)
Links
(Links page)
IRC Information
(IRC Page)
ISPs
(Linux Friendly ISPs)
Book Store
(Books through Amazon.com)
RFC Index
(Request For Comments)
Man Pages
(Linux Manual Pages)
LUGs
(Linux User Group Listing)

 


From VMS to Linux HOWTO: Graphics Next Previous Contents

6. Graphics

Among the scores of graphic packages available, gnuplot stands out for its power and ease of use. Go to X and type gnuplot, and have two sample data files ready: 2D-data.dat (two data per line), and 3D-data.dat (three data per line).

Examples of 2-D graphs:

gnuplot> set title "my first graph"
gnuplot> plot '2D-data.dat'
gnuplot> plot '2D-data.dat' with linespoints
gnuplot> plot '2D-data.dat', sin(x)
gnuplot> plot [-5:10] '2D-data.dat'

Example of 3-D graphs (each `row' of X values is followed by a blank line):

gnuplot> set parametric ; set hidden3d ; set contour
gnuplot> splot '3D-data.dat' using 1:2:3 with linespoints

A single-column datafile (e.g., a time series) can also be plotted as a 2-D graph:

gnuplot> plot [-5:15] '2D-data-1col.dat' with linespoints

or as a 3-D graph (blank lines in the datafile, as above):

gnuplot> set noparametric ; set hidden3d
gnuplot> splot '3D-data-1col.dat' using 1 with linespoints

To print a graph: if the command to print on your Postscript printer is lpr -Pps file.ps, issue:

gnuplot> set term post
gnuplot> set out '| lpr -Pps'
gnuplot> replot

then type set term x11 to restore. Don't get confused---the last print will come out only when you quit gnuplot.

For more info, type help or see the examples in directory /usr/lib/gnuplot/demos/, if you have it.


Next Previous Contents

TUCOWS NETWORK
_________________________________
Last Edited: Thursday, January 21, 1999 03:11 PM
Maintainer:
Rob Kennedy (rob@linuxberg.com)
Site Design - Graphicjam Digital Arts Inc. 1999.

® 1999 TUCOWS Interactive Ltd. All rights reserved