Richards Center at Yale University |
RC Home | Search | Table of Contents | General Information |
Last Modified: Friday, 27-Mar-2009 09:48:19 EDT
Documentation is at
http://www.gnuplot.info/docs/gnuplot.html
Examples are at http://www.gnuplot.info/screenshots/index.html
The picture on the right was generated by a data file with 240 rows
of 240 points each. It can be generated by the following commands.
(1) > gnuplot (2) gnuplot> set xrange [0:239]; set yrange [0:239] (3) gnuplot> set size ratio 1 (4) gnuplot> set cbrange [0:100] (5) gnuplot> set pm3d map (6) gnuplot> set title "Figure 1" (7) gnuplot> splot 'n3.dat' matrix
gnuplot> set palette gray gnuplot> replotIf you want to switch back to the default colorscale: gnuplot> set palette rgbformulae 7,5,15 gnuplot> replot |
![]() |
This example shows:
set xrange [0:14]; set yrange [0:19] set size ratio 1.333 set cbrange [0:100] set pm3d map set palette gray set title "Figure 2" set output 'Figure2.gif' set terminal gif splot 'n15x20.txt' matrixThe data file consists of 20 lines, each containing 15 numbers. To see the actual file in a new window, click here. |
|
The line set size ratio 1.333 Says that the y-axis should be displayed 1.333 times the length of the x-axis. Otherwise gnuplot will use an inappropriate default and the grid points will not be square.
Note that even though the data matrix is 15x20, gnuplot scales the actual picture up or down to what it thinks is a reasonable size for viewing. In this case, each point in the matrix is displayed in a 20-pixel-square box.
Last Modified: Friday, 27-Mar-2009 09:48:19 EDT
RC Home | Search | Table of Contents | General Information |
Richards Center (www.rc.yale.edu) at
Yale University (www.yale.edu)
Contact: michael^strickler_at_yale^edu |