- #1
erok81
- 464
- 0
Homework Statement
Download the file xxx.dat. Create a gnuplot "macro" lab03.gpl which, when loaded by gnuplot will do the following:
- create an output postscript file lab03.ps
- make a plot of the contents of xxx.dat, for x-axis (column 1) values between -0.5 and 3.5 and y-axis (column 2) values between -0.1 and 1.1, in the postscript file.
- reset the gnuplot terminal type to X11.
Homework Equations
None.
The Attempt at a Solution
Here is what I am doing.
I create a .dat with with the above download (which is just two columns of values).
Then I create a .gpl file with the following line: plot [-0.5:3.5] [-0.1:1.1] 'xxx.dat' with lines
After opening gnuplot I type: load "xxx.gpl" and my plot opens fine.
Reading some instructions on saving plots, I then do:
set terminal to postscript
set output "xxx.ps"
Then quit gnuplot.
Lastly I use gv to view my newly created .ps file using: gv xxx.ps. After a few seconds I get an error saying gv cannot open file because there is no data.
Sure enough using ls -l I can my xxx.ps file is 0kb.
Any ideas what I am doing wrong or why this isn't working?