First create a data file with entries as below:
0.00 2.00
1.00 3.1
32.1 5.6
54.33 9.4
.....
A data file can be created by redirecting the program output:
hopf> a.out > tempdata
"tempdata" will contain the data.
An alternative method for redirecting output is:
hopf> script
hopf> a.out
hopf> d
(press control-d)
"typescript" will contain the data.
To plot the data in a file called "tempdata" using gnuplot and then
create an output postscript file:
hopf> gnuplot
gnuplot> plot 'tempdata' t 'legendname' with lines
gnuplot> set output "filename.ps"
gnuplot> set terminal postscript
gnuplot> replot
gnuplot> quit
hopf> lpr filename.ps
To use logscales in gnuplot:
Syntax:
set logscale
set nologscale
show logscale
where may be any combinations of `x`, `y`, and `z`, in any
order, and where is the base of the log scaling. If
is not given, then 10 is assumed. If is not given then all
three axes are assumed. The command `set logscale` turns on log
scaling on the specified axes, while `set nologscale` turns off
log scaling.
Examples:
To enable log scaling in both x and z axes:
set logscale xz
To enable scaling log base 2 of the y axis:
set logscale y 2
To disable z axis log scaling:
set nologscale z
For more information regarding "gnuplot" and for instructions for how to get
it for your home computer, click below on "gnuplot info":
gnuplot info
To plot data in a file called "tempdata" using matlab and then print it:
hopf> matlab
>> load tempdata
>> x=tempdata(:,1);
>> y=tempdata(:,2);
>> plot(x,y);
>> print -P
>> quit
To plot data in a file called "tempdata.mat" using scilab (windows
machine) and then print it:
1. run scilab
2. change working directory to directory containing "tempdata.mat"
3. loadmatfile('-ascii','tempdata')
4. x=tempdata(:,1);
5. y=tempdata(:,2);
6. plot(x,y);
7. select the print option from the menu on the plot window...