diff --git a/gmx_funcs.sh b/gmx_funcs.sh
index 41d63172067b13c4539158cce4ea9c24cc9a283a..4506e4c8d52bc8ba3ac6300e2efbd6ea22cd1672 100755
--- a/gmx_funcs.sh
+++ b/gmx_funcs.sh
@@ -395,6 +395,7 @@ function xvg2png {
flagOut "-ymin" "<FLOAT>" "Set the lower bound of the y-axis range"
flagOut "-ymax" "<FLOAT>" "Set the upper bound of the y-axis range"
flagOut "-l|--lognum" "<INTEGER>" "Set the logfile to '_gp<INTEGER>.log'"
+ flagOut "-archer2" "" "Archer2 Fix"
echo -e "\n""Two xvg's on the same axes:"
flagOut "-dp|--double-plot" "<STRING>" "Produce <STRING>.png"
@@ -425,6 +426,7 @@ function xvg2png {
;;
-o|--output)
shift
+ OUTPUT=$1
GPSTRING=$GPSTRING"output='$1';"
shift
;;
@@ -480,6 +482,11 @@ function xvg2png {
shift
GPSTRING=$GPSTRING"ylog=1;"
;;
+ -archer2)
+ shift
+ GPSTRING=$GPSTRING"svg=1;"
+ ARCHER2=1
+ ;;
-ra|--running-average)
shift
GPSTRING=$GPSTRING"runavg=1;"
@@ -545,4 +552,9 @@ function xvg2png {
echo -ne $colBold"Plotting $PLOTFILE $colArg$SELECT$colClear$colBold... "
gnuplot -e "$GPSTRING" $GROMAX/xvg2png.gp > _gp$LOGNUM.log 2>&1
gmxRet $?
-}
\ No newline at end of file
+
+ if [ $ARCHER2 -eq 1 ] ; then
+ $GROMAX/svg2png.py $OUTPUT.svg $OUTPUT.png
+ fi
+
+}
diff --git a/install_cairosvg.sh b/install_cairosvg.sh
new file mode 100644
index 0000000000000000000000000000000000000000..021067326b7e8dc8490e0c43d57ef3556ac13cb2
--- /dev/null
+++ b/install_cairosvg.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+module load cray-python/3.9.7.1
+pip install cairosvg
diff --git a/xvg2png.gp b/xvg2png.gp
index 1cbe1254abb9d8cd3143f5659e2e7dba335a9acf..3f76c08f0c713e4a806ec98ea88a4a5807b9049d 100644
--- a/xvg2png.gp
+++ b/xvg2png.gp
@@ -1,6 +1,10 @@
###### TERMINAL OPTIONS ######
-set term pngcairo enhanced solid font 'Arial,24' size 900,675 # 0.5 textwidth on letter paper
+if (exists("svg")) {
+ set term svg enhanced solid font 'Arial,24' size 900,675 # 0.5 textwidth on letter paper
+} else {
+ set term pngcairo enhanced solid font 'Arial,24' size 900,675 # 0.5 textwidth on letter paper
+}
###### LINETYPES ######
@@ -82,10 +86,18 @@ set datafile commentschars "#@&" # for xvg
set rmargin at screen 0.95
-if (exists("output")) {
- set output output.'.png'
+if (exists("svg")) {
+ if (exists("output")) {
+ set output output.'.svg'
+ } else {
+ set output filename.'.svg'
+ }
} else {
- set output filename.'.png'
+ if (exists("output")) {
+ set output output.'.png'
+ } else {
+ set output filename.'.png'
+ }
}
set xlabel xlab