Article^ Parent
Gnuplot 笔记
Date: | 2018-12-27 00:00:00 |
Description: | Gnuplot 使用笔记。 |
Keywords: | Gnuplot, 作图 |
Category: | engineering_technology/computer/software/media/graphic |
Tag: | gnuplot, graphic |
Link: | https://www.diewuxi.com/blog/article/88.html |
Changelog
* 2018-12-27
* Add: Add commands section
* Add: Add -e option useage
* Modify: Change "unset key" to "set key off"
* 2018-07-28
* Done
Commands
# This is comment.
set term png [size {width in pixel},{height in pixel}] [font "{fontname},{fontsize}"]
set term pngcairo [size {width}[unit],{height}[unit]] [font "{fontname},{fontsize}"]
set output {output}
set border 3
set key off
set title {title}
set xlabel {xlabel}
set label 1 "label" at {}
set xrange {range}
set xtics {xtics}
plot {} with {}
load
pause -l
Interactive mode
Non-interactive mode
gnuplot
gnuplot {script_file_name}
gnuplot -e "{command ...}"
gnuplot -e "{command ...}" {script_file_name}
Example
File script.plt
:
set term png
set output "figure.png"
set key off
set xlabel "X (unit)"
set ylabel "Y (unit)"
set xrange [10:100]
set xtics 10
set mxtics 2
plot "./data" with linespoints linetype 5 pointtype 4
plot "./data" using 1:2 with linespoints linetype 5 pointtype 4
plot "./data" using 1:($2 * 3) with linespoints linetype 5 pointtype 4
plot "./data" using 1:2 with linespoints linetype 5 pointtype 4 title "First", \
"./data" using 3:4 with linespoints linetype 5 pointtype 4 title "Secend"
Last modified: 2018-12-27
Comments [0]
There is no comments now.