12.07.2015 Views

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

visualization tools 57302010‘dat a. graph’‘2. dat’‘3. dat’0–10–20–30–6 –4 –2 02 4 6Figure 3.6 A Gnuplot graph for three data sets with impulses and lines.Begin Gnuplot with a file of (x, y) data points, say, graph.dat. Next issue thegnuplot command from a shell or from the Start menu. A new window withthe Gnuplot prompt gnuplot> should appear. Construct your graph by enteringGnuplot commands at the Gnuplot prompt or by using the pull-down menus inthe Gnuplot window:> gnuplot Start Gnuplot programTerminal type set to ‘x11’Type of terminal for Unixgnuplot>The Gnuplot promptgnuplot> plot "graph.dat" Plot data file graph.datPlot a number of graphs on the same plot using several data files (Figure 3.6):gnuplot>plot ‘graph.dat’ with impulses, ‘2.dat’, ‘3.dat’ with linesThe general form of the 2-D plotting command and its options areplot {ranges} function {title} {style} {, function . . . }Commandwith pointswith lineswith linespointwith impulseswith dotsDefault. Plot a symbol at each point.Plot lines connecting the points.Plot lines and symbols.Plot vertical lines from the x axis to points.Plot a small dot at each point (scatterplots).For Gnuplot to accept the name of an external file, that name must be placed in‘single’ or “double” quotes. If there are multiple file names, the names must beseparated by commas. Explicit values for the x and y ranges are set with options:gnuplot> plot [xmin:xmax] [ymin:ymax] "file"gnuplot> plot [–10:10] [–5:30] "graph.dat"GenericExplicit−101<strong>COPYRIGHT</strong> <strong>2008</strong>, PRINCET O N UNIVE R S I T Y P R E S SEVALUATION COPY ONLY. NOT FOR USE IN COURSES.ALLpup_06.04 — <strong>2008</strong>/2/15 — Page 57

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!