From ba6ba1ea0f3c635707a722a260492bc3edf2a205 Mon Sep 17 00:00:00 2001 From: Kutalmis Bercin <kutalmis.bercin@esi-group.com> Date: Thu, 12 Dec 2019 16:33:36 +0000 Subject: [PATCH] ENH: add grid-line option into foamMonitor (#1197) foamMonitor -g foamMonitor -grid --- bin/foamMonitor | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/foamMonitor b/bin/foamMonitor index 2d9fed9ff8b..a15bd5b168f 100755 --- a/bin/foamMonitor +++ b/bin/foamMonitor @@ -6,7 +6,8 @@ # \\ / A nd | www.openfoam.com # \\/ M anipulation | #------------------------------------------------------------------------------- -# | Copyright (C) 2015 OpenFOAM Foundation +# Copyright (C) 2015 OpenFOAM Foundation +# Copyright (C) 2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM. @@ -40,11 +41,12 @@ usage() { Usage: ${0##*/} [OPTION] <file> options: - -h | -help print the usage + -h | -help prints the usage -i | -idle <time> stops if <file> unchanging for <time> sec (default = 60) -l | -logscale plots data (y-axis) on log scale, e.g. for residuals -r | -refresh <time> refreshes display every <time> sec (default = 10) -y | -yrange <range> sets data (y-axis) <range>, format "[0:1]" + -g | -grid draws grid lines on the plot Monitor data with Gnuplot from time-value(s) graphs written by OpenFOAM e.g. by functionObjects @@ -62,6 +64,7 @@ plotFileHeader() { set term x11 1 font "helvetica,17" linewidth 1.5 persist noraise $LOGSCALE $YRANGE +$GRID set title "Data Monitoring" set xlabel "$XLABEL" plot \\ @@ -82,6 +85,7 @@ IDLE=60 REFRESH=10 LOGSCALE="" YRANGE="" +GRID="" GNUPLOT=$(which gnuplot) ! [ "x$GNUPLOT" = "x" ] || usage "Gnuplot not installed" @@ -111,6 +115,10 @@ do YRANGE="set yrange $2" shift 2 ;; + -g | -grid) + GRID="set grid" + shift 1 + ;; -*) usage "unknown option: '$*'" ;; -- GitLab