From 5ba4db79028de8e383350df434fb4ac3e7a646bf Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 20 Feb 2021 13:42:36 -0800 Subject: [PATCH] more guide plots --- guide/guide-10.svg | 642 +++++++++++++++++++++++++++++++++++++++++++ guide/guide-12.svg | 463 ++++++++++++++++++++++++++++++++ guide/guide-15.svg | 397 +++++++++++++++++++++++++++ guide/guide-16.svg | 473 ++++++++++++++++++++++++++++++++ guide/guide-18.svg | 565 ++++++++++++++++++++++++++++++++++++++ guide/guide-20.svg | 352 ++++++++++++++++++++++++ guide/guide-21.svg | 478 +++++++++++++++++++++++++++++++++ guide/guide-8.svg | 657 +++++++++++++++++++++++++++++++++++++++++++++ guide/guide.org | 80 +++--- 9 files changed, 4067 insertions(+), 40 deletions(-) create mode 100644 guide/guide-10.svg create mode 100644 guide/guide-12.svg create mode 100644 guide/guide-15.svg create mode 100644 guide/guide-16.svg create mode 100644 guide/guide-18.svg create mode 100644 guide/guide-20.svg create mode 100644 guide/guide-21.svg create mode 100644 guide/guide-8.svg diff --git a/guide/guide-10.svg b/guide/guide-10.svg new file mode 100644 index 0000000..c310a93 --- /dev/null +++ b/guide/guide-10.svg @@ -0,0 +1,642 @@ + + + +Gnuplot +Produced by GNUPLOT 5.4 patchlevel 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + + + + + + + + + -0.8 + + + + + + + + + + + + + -0.6 + + + + + + + + + + + + + -0.4 + + + + + + + + + + + + + -0.2 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0.2 + + + + + + + + + + + + + 0.4 + + + + + + + + + + + + + 0.6 + + + + + + + + + + + + + 0.8 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 10 + + + + + + + + + + + + + 20 + + + + + + + + + + + + + 30 + + + + + + + + + + + + + 40 + + + + + + + + + + + + + 50 + + + + + + + + + + + + + 60 + + + + + + + + + + + + + 70 + + + + + + + + + + + + + 80 + + + + + + + + + + + + + 90 + + + + + + + + + + + + + 100 + + + + + + + + + gnuplot_plot_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + -0.8 + + + + + -0.6 + + + + + -0.4 + + + + + -0.2 + + + + + 0 + + + + + 0.2 + + + + + 0.4 + + + + + 0.6 + + + + + 0.8 + + + + + 1 + + + + + + + + + diff --git a/guide/guide-12.svg b/guide/guide-12.svg new file mode 100644 index 0000000..9a08d4f --- /dev/null +++ b/guide/guide-12.svg @@ -0,0 +1,463 @@ + + + +Gnuplot +Produced by GNUPLOT 5.4 patchlevel 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + + + + + + + + + -0.8 + + + + + + + + + + + + + -0.6 + + + + + + + + + + + + + -0.4 + + + + + + + + + + + + + -0.2 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0.2 + + + + + + + + + + + + + 0.4 + + + + + + + + + + + + + 0.6 + + + + + + + + + + + + + 0.8 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + -1 + + + + + + + + + + + + + -0.8 + + + + + + + + + + + + + -0.6 + + + + + + + + + + + + + -0.4 + + + + + + + + + + + + + -0.2 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0.2 + + + + + + + + + + + + + 0.4 + + + + + + + + + + + + + 0.6 + + + + + + + + + + + + + 0.8 + + + + + + + + + + + + + 1 + + + + + + + + + gnuplot_plot_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/guide/guide-15.svg b/guide/guide-15.svg new file mode 100644 index 0000000..64d6d7d --- /dev/null +++ b/guide/guide-15.svg @@ -0,0 +1,397 @@ + + + +Gnuplot +Produced by GNUPLOT 5.4 patchlevel 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + -0.8 + + + + + -0.6 + + + + + -0.4 + + + + + -0.2 + + + + + 0 + + + + + 0.2 + + + + + 0.4 + + + + + 0.6 + + + + + 0.8 + + + + + 1 + + + + + -8 + + + + + -6 + + + + + -4 + + + + + -2 + + + + + 0 + + + + + 2 + + + + + 4 + + + + + 6 + + + + + 8 + + + + + + + + + Angle (rad) + + + + + gnuplot_plot_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + gnuplot_plot_2 + + + cosine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sine and cosine + + + + + + + diff --git a/guide/guide-16.svg b/guide/guide-16.svg new file mode 100644 index 0000000..cdfb0b7 --- /dev/null +++ b/guide/guide-16.svg @@ -0,0 +1,473 @@ + + + +Gnuplot +Produced by GNUPLOT 5.4 patchlevel 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -8 + + + + + + + + + + + + + -6 + + + + + + + + + + + + + -4 + + + + + + + + + + + + + -2 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 2 + + + + + + + + + + + + + 4 + + + + + + + + + + + + + 6 + + + + + + + + + + + + + 8 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 10 + + + + + + + + + + + + + 20 + + + + + + + + + + + + + 30 + + + + + + + + + + + + + 40 + + + + + + + + + + + + + 50 + + + + + + + + + + + + + 60 + + + + + + + + + + + + + 70 + + + + + + + + + + + + + 80 + + + + + + + + + + + + + 90 + + + + + + + + + + + + + 100 + + + + + + + + + gnuplot_plot_1 + + + + gnuplot_plot_2 + + + + gnuplot_plot_3 + + + + gnuplot_plot_4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/guide/guide-18.svg b/guide/guide-18.svg new file mode 100644 index 0000000..a15faac --- /dev/null +++ b/guide/guide-18.svg @@ -0,0 +1,565 @@ + + + +Gnuplot +Produced by GNUPLOT 5.4 patchlevel 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + + + + + + + + + -0.8 + + + + + + + + + + + + + -0.6 + + + + + + + + + + + + + -0.4 + + + + + + + + + + + + + -0.2 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0.2 + + + + + + + + + + + + + 0.4 + + + + + + + + + + + + + 0.6 + + + + + + + + + + + + + 0.8 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + -8 + + + + + + + + + + + + + -6 + + + + + + + + + + + + + -4 + + + + + + + + + + + + + -2 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 2 + + + + + + + + + + + + + 4 + + + + + + + + + + + + + 6 + + + + + + + + + + + + + 8 + + + + + + + + + gnuplot_plot_1 + + + sin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + gnuplot_plot_2 + + + cos + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/guide/guide-20.svg b/guide/guide-20.svg new file mode 100644 index 0000000..adde932 --- /dev/null +++ b/guide/guide-20.svg @@ -0,0 +1,352 @@ + + + +Gnuplot +Produced by GNUPLOT 5.4 patchlevel 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + + + + + + + + + -0.8 + + + + + + + + + + + + + -0.6 + + + + + + + + + + + + + -0.4 + + + + + + + + + + + + + -0.2 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0.2 + + + + + + + + + + + + + 0.4 + + + + + + + + + + + + + 0.6 + + + + + + + + + + + + + 0.8 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + -8 + + + + + + + + + + + + + -6 + + + + + + + + + + + + + -4 + + + + + + + + + + + + + -2 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 2 + + + + + + + + + + + + + 4 + + + + + + + + + + + + + 6 + + + + + + + + + + + + + 8 + + + + + + + + + Angle (rad) + + + + + gnuplot_plot_1 + + + sine + + + + + + + + + + + + + + + + sinusoid + + + + + + + diff --git a/guide/guide-21.svg b/guide/guide-21.svg new file mode 100644 index 0000000..dc63228 --- /dev/null +++ b/guide/guide-21.svg @@ -0,0 +1,478 @@ + + + +Gnuplot +Produced by GNUPLOT 5.4 patchlevel 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + multiplot sin,cos + + + + + + + + + + + + + + + -1 + + + + + + + + + + + + + -0.5 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0.5 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + 2 + + + + + + + + + + + + + 3 + + + + + + + + + + + + + 4 + + + + + + + + + + + + + 5 + + + + + + + + + + + + + 6 + + + + + + + + + gnuplot_plot_1a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cos + + + + + + + + + + + + + + + -1 + + + + + + + + + + + + + -0.5 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0.5 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + 2 + + + + + + + + + + + + + 3 + + + + + + + + + + + + + 4 + + + + + + + + + + + + + 5 + + + + + + + + + + + + + 6 + + + + + + + + + gnuplot_plot_1b + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sin + + + + + + + diff --git a/guide/guide-8.svg b/guide/guide-8.svg new file mode 100644 index 0000000..439e9b7 --- /dev/null +++ b/guide/guide-8.svg @@ -0,0 +1,657 @@ + + + +Gnuplot +Produced by GNUPLOT 5.4 patchlevel 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + + + + + + + + + -0.8 + + + + + + + + + + + + + -0.6 + + + + + + + + + + + + + -0.4 + + + + + + + + + + + + + -0.2 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0.2 + + + + + + + + + + + + + 0.4 + + + + + + + + + + + + + 0.6 + + + + + + + + + + + + + 0.8 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + -1 + + + + + + + + + + + + + -0.8 + + + + + + + + + + + + + -0.6 + + + + + + + + + + + + + -0.4 + + + + + + + + + + + + + -0.2 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0.2 + + + + + + + + + + + + + 0.4 + + + + + + + + + + + + + 0.6 + + + + + + + + + + + + + 0.8 + + + + + + + + + + + + + 1 + + + + + + + + + gnuplot_plot_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + gnuplot_plot_2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 50 + + + + + 100 + + + + + 150 + + + + + 200 + + + + + 250 + + + + + 300 + + + + + 350 + + + + + 400 + + + + + + + + + diff --git a/guide/guide.org b/guide/guide.org index 2217a39..090b855 100644 --- a/guide/guide.org +++ b/guide/guide.org @@ -9,8 +9,8 @@ First, a trivial plot: let's plot a sinusoid #+BEGIN_SRC sh :results file link :exports both seq 100 | \ - perl -nE 'say sin($_/5.)' | \ - feedgnuplot +perl -nE 'say sin($_/5.)' | \ +feedgnuplot #+END_SRC #+RESULTS: @@ -28,8 +28,8 @@ together: #+BEGIN_SRC sh :results file link :exports both seq 100 | \ - perl -nE '$th = $_/100.*2.*3.14159; $s=sin($th); $c=cos($th); say "$c $s"' | \ - feedgnuplot +perl -nE '$th = $_/100.*2.*3.14159; $s=sin($th); $c=cos($th); say "$c $s"' | \ +feedgnuplot #+END_SRC #+RESULTS: @@ -40,10 +40,10 @@ from every line, but a sine from every 5th line: #+BEGIN_SRC sh :results file link :exports both seq 100 | \ - perl -nE '$th = $_/100.*2.*3.14159; $s=sin($th); $c=cos($th); - if($.%5) { say "$c"; } - else { say "$c $s"; }' | \ - feedgnuplot +perl -nE '$th = $_/100.*2.*3.14159; $s=sin($th); $c=cos($th); + if($.%5) { say "$c"; } + else { say "$c $s"; }' | \ +feedgnuplot #+END_SRC #+RESULTS: @@ -56,8 +56,8 @@ input is interpreted as =x y0 y1 y2...=. Let's plot =sin(theta)= vs. #+BEGIN_SRC sh :results file link :exports both seq 100 | \ - perl -nE '$th = $_/100.*2.*3.14159; $s=sin($th); $c=cos($th); say "$c $s"' | \ - feedgnuplot --domain +perl -nE '$th = $_/100.*2.*3.14159; $s=sin($th); $c=cos($th); say "$c $s"' | \ +feedgnuplot --domain #+END_SRC #+RESULTS: @@ -69,8 +69,8 @@ We can scale the axes /together/ by passing =--square=, and we get a circle: #+BEGIN_SRC sh :results file link :exports both seq 100 | \ - perl -nE '$th = $_/100.*2.*3.14159; $s=sin($th); $c=cos($th); say "$c $s"' | \ - feedgnuplot --domain --square +perl -nE '$th = $_/100.*2.*3.14159; $s=sin($th); $c=cos($th); say "$c $s"' | \ +feedgnuplot --domain --square #+END_SRC #+RESULTS: @@ -80,11 +80,11 @@ Again, we can have multiple =y= in each line, and each line may have a different number of =y=. Let's plot a circle /and/ an ellipse, sampled more coarsely: #+BEGIN_SRC sh :results file link :exports both seq 100 | \ - perl -nE '$th = $_/100.*2.*3.14159; $s=sin($th); $c=cos($th); - if($.%5) { say "$c $s"; } - else { $s2 = $s/2; - say "$c $s $s2"; }' | \ - feedgnuplot --domain --square +perl -nE '$th = $_/100.*2.*3.14159; $s=sin($th); $c=cos($th); + if($.%5) { say "$c $s"; } + else { $s2 = $s/2; + say "$c $s $s2"; }' | \ +feedgnuplot --domain --square #+END_SRC #+RESULTS: @@ -95,17 +95,17 @@ We just plotted something where each point is represented by 2 values: =x= and possible. What if we want to color-code our points using another column of data? We feed in the new column, and we tell =feedgnuplot= that we now have /3/ values per point (the tuple size), and we tell =gnuplot= how we want this plot to be -made: +made. Color-coding by the angle, in degrees: #+BEGIN_SRC sh :results file link :exports both seq 100 | \ - perl -nE '$thdeg = $_/100.*360.; - $th = $_/100.*2.*3.14159; - $s=sin($th); $c=cos($th); - say "$c $s $thdeg";' | \ - feedgnuplot --domain --square \ - --tuplesizeall 3 \ - --styleall 'with points palette' +perl -nE '$thdeg = $_/100.*360.; + $th = $_/100.*2.*3.14159; + $s=sin($th); $c=cos($th); + say "$c $s $thdeg";' | \ +feedgnuplot --domain --square \ + --tuplesizeall 3 \ + --styleall 'with points palette' #+END_SRC #+RESULTS: @@ -119,26 +119,26 @@ plenty of documentation about styling details. The above =--styleall= argument may be identically replaced with a shorthand: -#+BEGIN_SRC sh :results none :exports none ---with points palette' -#+END_SRC +#+BEGIN_EXAMPLE +--with 'points palette' +#+END_EXAMPLE The styles and tuple sizes can be different for each dataset. For instance, to -apply the colors only to the circle, leaving the ellipse with the default tuple -size and style: +apply the colors only to the circle (dataset 0), leaving the ellipse (dataset 1) +with the default tuple size and style: #+BEGIN_SRC sh :results file link :exports both seq 100 | \ - perl -nE '$thdeg = $_/100.*360.; - $th = $_/100.*2.*3.14159; - $s=sin($th); $c=cos($th); - if($.%5) { say "$c $s $thdeg" } - else { $s2 = $s/2; - say "$c $s $thdeg $s2"; }' | \ - feedgnuplot --domain --square \ - --tuplesize 0 3 \ - --style 0 'with points palette' +perl -nE '$thdeg = $_/100.*360.; + $th = $_/100.*2.*3.14159; + $s=sin($th); $c=cos($th); + if($.%5) { say "$c $s $thdeg" } + else { $s2 = $s/2; + say "$c $s $thdeg $s2"; }' | \ +feedgnuplot --domain --square \ + --tuplesize 0 3 \ + --style 0 'with points palette' #+END_SRC #+RESULTS: -[[file:guide-9.svg]] +[[file:guide-8.svg]]