![]() ![]() For example, ' /gnulinewidth 5.000 def' sets the line thicknesses, and ' 50 50 translate' ' 0.050 0.050 scale' set the location and scale of the plot. You can edit this file in several places easily. ![]() The PostScript commands used in gnuplot are described in: The PostScript commands used in GnuPlot are described in /usr/local/gnuplot/docs/ps/ps_file.doc. Hardcopies: landscape plots, thicker lines, location of plots, etc. Gnuplot> set terminal x11 # ditto for terminal type Gnuplot> set output # set output back to default Options are 'eps enhanced monochrome dashed defaultplex "Helvetica" 14' Plot "3 & NR set terminal postscript eps enhanced # 'w lp lt 1 lw 2 pt 5' means 'with linespoints linetype 1 lineweight 2 pointtype 5' # to plot lines 4-20 from a file with filled square points and double-weight solid lines # Note, to do SM-like arithmetic on columns, # The 1:2 means plot x from column 1, y from column 2 # If you are using Solaris, you may not have 'yes', so code it (fortran) via ![]() # To make a table that has column1 = 0.05, 0.1. Then follow the description below to do arithmetic on the columns with awk or the 'plot using' command. Instead of loading variables into a vector and multiplying vectors together, I usually just make a table where the values of each vector are represented by a column. Vectors / plotting data from a file / plotting single points The linestyle command is a shortcut to changing the points and line types each time. Storing and using a line type and point type Set arrow from 1,2 to 4,8.4 nohead lt -1 lw 1.2 # use the arrow command with nohead to draw just a line: # lw chooses a line width 1=normal, can use 0.8, 0.3, 1.5, 3, etc. # lt must be specified before pt for coloured points ![]() # type 'test' to see the colours and point types available. # 7=filled circle, 8=triangle, 9=filled triangle, etc. # type 'test' to see the colours and point types available # for errorbar options type 'help plot errorbars' # choice of points, lines, linespoints, steps, boxes, errorbars, impulses, etc. # the noautoscale, xrange, yrange change the x- and y-limits Probably the easiest way to work edit the command file in one shell and have a second shell running GnuPlot where I simply keep loading in the new command file and it makes a new eps file each time I load, and then a third shell running ghostview to view the eps file. Note: Most of the following examples were taken directly from Patrick Hartigan's site. gnuplot_i can be downloaded here: Examples Gnuplot_i is an interface that allows a running program in Fortran or C to pass data to GnuPlot for plotting. 2.24 Hardcopies: landscape plots, thicker lines, location of plots, etc.2.8 Vectors / plotting data from a file / plotting single points.2.7 Storing and using a line type and point type.2.6 Draw a line of arrow between two points. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |