сохранение gnuplot фигурирует, не отображая график

У меня есть файл данных (data.txt). Я могу отобразить данные на графике с использованием gnup команда. Как;

gnup -p data.txt -xl 'Hours' -yl 'Data (m)'

Я должен сохранить график (например, png формат) после выполнения выше команды, не отображая данные на графике. Это возможно?

0
задан 9 August 2016 в 16:28

1 ответ

gnuplot имеет set output команда, которую я использую для сохранения копии моего графика:

#!/bin/bash 
# Run this script after synching the Palm with $HOME/Visor/.last

# Weight - extract my weight data fron the Visor, clean it
# up, and feed it to gnuplot

target=$HOME/Visor/var/Weight
visorhome="$HOME/Visor"
gnuplotdata="${target}.pltdata"
gnuplotout="${target}.ps"

# ... data prep omitted - data to plot is in $gnuplotdata 

gnuplot <<EOF
set title "Weight and running average, in kilograms, for Walt Sullivan"
set timefmt "%y/%m/%d"
set xdata time
set format x "%y/%m/%d"
plot "$gnuplotdata" using 1:2 with linespoints, "" using 1:3 with linespoints;
pause 10 "Plot will close in 10 seconds, see $gnuplotout"
set terminal postscript enhanced color landscape
set output "$gnuplotout"
replot
EOF

exit 0

Для узнавания больше введите:

$ gnuplot
gnuplot> help set output
 By default, screens are displayed to the standard output. The `set output`
 command redirects the display to the specified file or device.
...
1
ответ дан 28 September 2019 в 17:20

Другие вопросы по тегам:

Похожие вопросы: