-
Notifications
You must be signed in to change notification settings - Fork 1
Gnuplot_mplot
Display several plots using gnuplot. To move from one plot to the next one press return. 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_mplot 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
,y2_column
are they1
andy2
columns (see input file example bellow)
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 colums 3 (y1
) and 4 (y2
) versus the 1 (x
) of all the files namedc564a_tif_ip_ctf000??_model_radial.txt
$ gnuplot_mplot.bat 1 3 4 c564a_tif_ip_ctf000??_model_radial.txt >> kk
$ gnuplot kk
- This program is a script file. It does assume that the csh shell is at
/bin/csh
, if this is not the case you will need to edit the script file an add the right path tocsh
--Main.AlfredoSolano - 30 Jan 2007