From bac8a5d2822835cf47175d1162030653fadd5c09 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 15 Feb 2024 23:29:57 +0000 Subject: deploy: 4485708c972815bbb6df7f5a228683aa855d553d --- tools/gnuplot.html | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'tools/gnuplot.html') diff --git a/tools/gnuplot.html b/tools/gnuplot.html index a794455..85ec9bd 100644 --- a/tools/gnuplot.html +++ b/tools/gnuplot.html @@ -185,30 +185,30 @@ gnuplot [opt] opt: -p ................ persist plot window -c <file> ......... run script file - -e "<cmd1>; .." ... run cmd(s) + -e "<cmd1>; .." ... run cmd(s)

Frequently used configuration

# Plot title.
-set title "the plot"
+set title "the plot"
 
 # Labels.
-set xlabel "abc"
-set ylabel "def"
+set xlabel "abc"
+set ylabel "def"
 
 # Output format, 'help set term' for all output formats.
 set term svg
 # Output file.
-set output "out.svg"
+set output "out.svg"
 
 # Make axis logarithmic to given base.
 set logscale x 2
 
 # Change separator, default is whitespace.
-set datafile separator ","
+set datafile separator ","
 

Plot

# With specific style (eg lines, linespoint, boxes, steps, impulses, ..).
-plot "<data_file>" with <plot_style>
+plot "<data_file>" with <plot_style>
 
 > cat data.txt
 1 1 3
@@ -217,30 +217,30 @@ plot "<data_file>" with <plot_style>
 4 2 2
 
 # Plot specific column.
-plot "data.txt" using 1:2, "data.txt" using 1:3
-# Equivalent using the special file "", which re-uses the previous input file.
-plot "data.txt" using 1:2, "" using 1:3
+plot "data.txt" using 1:2, "data.txt" using 1:3
+# Equivalent using the special file "", which re-uses the previous input file.
+plot "data.txt" using 1:2, "" using 1:3
 
 # Plot piped data.
-plot "< head -n2 data.txt"
+plot "< head -n2 data.txt"
 
 # Plot with alternate title.
-plot "data.txt" title "moose"
+plot "data.txt" title "moose"
 

Example: multiple data sets in on plot

# file: mem_lat.plot
 
-set title  "memory latency (different strides)"
-set xlabel "array in KB"
-set ylabel "cycles / access"
+set title  "memory latency (different strides)"
+set xlabel "array in KB"
+set ylabel "cycles / access"
 
 set logscale x 2
 
-plot "stride_32.txt"  title "32"  with linespoints, \
-     "stride_64.txt"  title "64"  with linespoints, \
-     "stride_128.txt" title "128" with linespoints, \
-     "stride_256.txt" title "256" with linespoints, \
-     "stride_512.txt" title "512" with linespoints
+plot "stride_32.txt"  title "32"  with linespoints, \
+     "stride_64.txt"  title "64"  with linespoints, \
+     "stride_128.txt" title "128" with linespoints, \
+     "stride_256.txt" title "256" with linespoints, \
+     "stride_512.txt" title "512" with linespoints
 

On Linux x86_64, mem_lat.c provides an example which can be run as follows.

-- cgit v1.2.3