diff options
author | johannst <johannst@users.noreply.github.com> | 2024-02-15 23:29:57 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2024-02-15 23:29:57 +0000 |
commit | bac8a5d2822835cf47175d1162030653fadd5c09 (patch) | |
tree | 28f312a114cf95ac799daac2a2caec4b8612d84d /tools/gnuplot.html | |
parent | bfc5ce4bc01e5eb28969eefcc01ecfefa2601fdf (diff) | |
download | notes-bac8a5d2822835cf47175d1162030653fadd5c09.tar.gz notes-bac8a5d2822835cf47175d1162030653fadd5c09.zip |
deploy: 4485708c972815bbb6df7f5a228683aa855d553d
Diffstat (limited to 'tools/gnuplot.html')
-rw-r--r-- | tools/gnuplot.html | 40 |
1 files changed, 20 insertions, 20 deletions
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) </code></pre> <h2 id="frequently-used-configuration"><a class="header" href="#frequently-used-configuration">Frequently used configuration</a></h2> <pre><code class="language-sh"># 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 "," </code></pre> <h2 id="plot"><a class="header" href="#plot">Plot</a></h2> <pre><code class="language-sh"># 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" </code></pre> <h2 id="example-multiple-data-sets-in-on-plot"><a class="header" href="#example-multiple-data-sets-in-on-plot">Example: multiple data sets in on plot</a></h2> <pre><code class="language-sh"># 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 </code></pre> <p>On Linux x86_64, <a href="gnuplot/mem_lat.c"><code>mem_lat.c</code></a> provides an example which can be run as follows.</p> |