Skip to content
Snippets Groups Projects
Commit ecd1dcd8 authored by Kutalmış Berçin's avatar Kutalmış Berçin
Browse files

ENH: add grid-line option into foamMonitor (#1197)

    foamMonitor -g
    foamMonitor -grid
parent 69508a90
No related merge requests found
......@@ -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: '$*'"
;;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment