-
Notifications
You must be signed in to change notification settings - Fork 1
Gnuplot_mprint
Produce several plots (as postscript files) using gnuplot so it can be easy printed in a laser printer. The file name of the output files (one per plot) is001.ps
,002.ps
, etc. This script was originally developed to visualize the CTF estimations given by the program assign_CTF.
This script was created to add wildcard capability to gnuplot. In particular, when plotting several files we want to replace the repetition of the same command per each input file
$ gnuplot> plot 'data001.dat' u 1:5
$ gnuplot> plot 'data002.dat' u 1:5
...
$ gnuplot> plot 'data095.dat' u 1:5
by:
$ gnuplot> plot 'data0*.dat' u 1:5
The solution has been to write a script that creates the long command line. This script produces a file that may be loaded by gnuplot using the command
$ gnuplot file_name
or
$ gnuplot> load "file_name"
$ gnuplot_mprint x_column y1_column y2_column [file name]
Where the[file name]
admits wildcards, i.e., the characters?
and =*=. The[file name]
refers to the ASCII file/s containing the data andx_column
is the column with thex
coordinates whiley1_column
andy2_column
are they1
andy2
columns (see input file example below)
Data File example:
# freq gaus ctf2
0.101562 0.0275985 2.7502 3.00159
0.103516 0.0281292 2.65914 2.82368
0.105469 0.02866 2.56548 2.6486
0.107422 0.0291907 2.46446 2.50673
0.109375 0.0297215 2.36624 2.37351
0.111328 0.0302522 2.27119 2.26183
0.113281 0.0307829 2.17829 2.17993
0.115234 0.0313137 2.09042 2.07974
0.117188 0.0318444 2.00525 2.01272
0.119141 0.0323752 1.92695 1.9259
0.121094 0.0329059 1.85569 1.86493
0.123047 0.0334367 1.79342 1.80312
0.125 0.0339674 1.74001 1.74423
To plot the columns 3 (y1
) and 4 (y2
) versus the 1 (x
) of all the files namedc564a_tif_ip_ctf000??_model_radial.txt
$ gnuplot_mprint.bat 1 3 4 c564a_tif_ip_ctf000??_model_radial.txt >> kk
$ gnuplot kk
If the packagepsutils
is available the following command can be used to reduce the size of the plots and place four of them per page. In this example the output file in namedyy.eps
$ gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=kk.eps -f ???.ps
$ psnup -4 -q -pa4 -Pa4 kk.eps yy.eps -l
- This program is a script. It does assume that the
csh
shell is at/bin/csh
. If this is not the case please edit the script and correct the path
--Main.AlfredoSolano - 30 Jan 2007