3

I know that If I do:

xmgrace file1 file2 file2

There will be three sets of plots in different colors, and that if there are multiple columns in those files, the second the column will be plotted against the first.

What if I want plot the 3rd against the 1st for all of them?

I tried

xmgrace -block file1 file2 file2 -bxy 1:3

which doesn't work

Thanks for any help!

Sathyam
  • 200
  • 3
  • 15
Zhangyi Hu
  • 39
  • 1
  • 2
  • 3

1 Answers1

6

Solution:

It is necessary to specify the -block flag and the -bxy col1:col2 flag/info for each file.

xmgrace -block file1 -bxy 1:3 -block file2 -bxy 1:3 -block file3 -bxy 1:3

Explanation:

From the xmgrace manual:

 -block file
          Assume the data file is block data
   -bxy x:y:etc.
          Form a set from the current block data set using the current set
          type from columns given in the argument

If you want to plot multiple sets of columns from the same file, you only need to use -block once, to specify the current block data set, then use -bxy to form data sets from the current block data set:

xmgrace -block file1 -bxy 1:3 -bxy 1:4 -bxy 1:5

For multiple files, like for what you are attempting, you must specify each file as the "current" block data set in sequence, and each time create new sets from the required columns using -bxy n:m.

It is more time-consuming to type, but follows logical progression from the single data file situation.

feedMe
  • 3,431
  • 2
  • 36
  • 61