############################################################ # Sample 'sm' input file: Commands can also be typed # interactively ############################################################ ############################################################ # Enable the following line to produce postscript output # to a file named 'smexample.ps' ############################################################ device postencap smexample.ps ############################################################ # Clear the plot area. ############################################################ erase ############################################################ # Define data file, read 1st column into vector 'x', 2nd # column into vector 'y'. ############################################################ data sinxdata read {x 1 y 2} ############################################################ # Determine axes limits based on data just read ############################################################ limits x y ############################################################ # Kludge to force use of "good-looking" (Hershey) fonts ############################################################ expand 1.0001 ############################################################ # Draw boxed-axes ############################################################ box ############################################################ # Set the symbol (point) type to four-sided (squares) and # filled ############################################################ ptype 4 3 ############################################################ # Plot data using symbols twice the default size ############################################################ expand 2.0 points x y ############################################################ # Give the axes some labels, make size of text somewhat # larger than the default # factor ############################################################ expand 1.25 xlabel x ylabel sin(x)