Home > OS >  xmgrace: changing color of the XY graph in batch execution
xmgrace: changing color of the XY graph in batch execution

Time:10-12

I am using gracebat integrated into my bash script to make simple XY graph from 2D numerical data

gracebat input.xvg -hdevice PNG -fixed 800 600 -world 0 0.02 610 0.5 -printfile output.png -hardcopy

This simple execution without GUI produces the XY graph totally in black color! enter image description here would it be possible to quickly change to color of the line (I guess should be s0 color in the batch file) without using batch file for gracebat: e.g. via some option of gracebat or alternatively via editing of the input.xvg (via sed or any shell utility) specifying color or the line:

@ s0 line color 2 

Alternatively, if the grace has not good possibilities for graph customization, I would be grateful for simple example of the gnuplot batch execution.

CodePudding user response:

What does xmgrace -help say? Please check the corresponding manuals and homepages and do a search on SO and the web before asking such questions. I don't now xmgrace and its documentation.

But a gnuplot command line would be using the command line option -e: (check help command line options).

gnuplot -e "set term pngcairo size 800,600; set output 'myFile.png'; plot 'myFile.dat' u 1:2 w l lc 'red' "
  • Related