Docs updated

This commit is contained in:
Giorgio Calderone 2020-04-08 00:12:07 +02:00
parent b56e8b7fbc
commit 27f73203be
21 changed files with 38 additions and 38 deletions

View File

@ -16,16 +16,16 @@ name = "\$MyDataSet1"
a = gpexec("print a"), a = gpexec("print a"),
b = gpexec("print b"), b = gpexec("print b"),
c = gpexec(&quot;print c&quot;))</code></pre><pre><code class="language-none">┌ Info: Best fit values: c = gpexec(&quot;print c&quot;))</code></pre><pre><code class="language-none">┌ Info: Best fit values:
│ a = &quot;1.49027843564636&quot; │ a = &quot;1.52455657762681&quot;
│ b = &quot;0.291241150034077&quot; │ b = &quot;0.263740767002851&quot;
└ c = &quot;0.712856583575748&quot;</code></pre><p>A named dataset is available until the session is reset, i.e. as long as <code>:-</code> is used as first argument to <code>@gp</code>.</p><h2 id="Multiplot-1"><a class="docs-heading-anchor" href="#Multiplot-1">Multiplot</a><a class="docs-heading-anchor-permalink" href="#Multiplot-1" title="Permalink"></a></h2><p><strong>Gnuplot.jl</strong> can draw multiple plots in the same figure by exploiting the <code>multiplot</code> command. Each plot is identified by a positive integer number, which can be used as argument to <code>@gp</code> to redirect commands to the appropriate plot.</p><p>Continuing previous example we can plot both data and best fit model (in plot <code>1</code>) and residuals (in plot <code>2</code>):</p><pre><code class="language-julia">@gp :- &quot;set multiplot layout 2,1&quot; └ c = &quot;0.709597164355116&quot;</code></pre><p>A named dataset is available until the session is reset, i.e. as long as <code>:-</code> is used as first argument to <code>@gp</code>.</p><h2 id="Multiplot-1"><a class="docs-heading-anchor" href="#Multiplot-1">Multiplot</a><a class="docs-heading-anchor-permalink" href="#Multiplot-1" title="Permalink"></a></h2><p><strong>Gnuplot.jl</strong> can draw multiple plots in the same figure by exploiting the <code>multiplot</code> command. Each plot is identified by a positive integer number, which can be used as argument to <code>@gp</code> to redirect commands to the appropriate plot.</p><p>Continuing with the previous example we can plot both data and best fit model (in plot <code>1</code>) and residuals (in plot <code>2</code>):</p><pre><code class="language-julia">@gp :- &quot;set multiplot layout 2,1&quot;
@gp :- 1 &quot;p $name w errorbars t &#39;Data&#39;&quot; @gp :- 1 &quot;p $name w errorbars t &#39;Data&#39;&quot;
@gp :- &quot;p $name u 1:(f(\$1)) w l t &#39;Best fit model&#39;&quot; @gp :- &quot;p $name u 1:(f(\$1)) w l t &#39;Best fit model&#39;&quot;
@gp :- 2 &quot;p $name u 1:((f(\$1)-\$2) / \$3):(1) w errorbars t &#39;Resid. [{/Symbol s}]&#39;&quot; @gp :- 2 &quot;p $name u 1:((f(\$1)-\$2) / \$3):(1) w errorbars t &#39;Resid. [{/Symbol s}]&#39;&quot;
@gp :- [extrema(x)...] [0,0] &quot;w l notit dt 2 lc rgb &#39;black&#39;&quot; # reference line</code></pre><p><img src="../assets/ex011.png" alt/></p><p>Note that the order of the plots is not relevant, i.e. we would get the same results with:</p><pre><code class="language-julia">@gp :- &quot;set multiplot layout 2,1&quot; @gp :- [extrema(x)...] [0,0] &quot;w l notit dt 2 lc rgb &#39;black&#39;&quot; # reference line</code></pre><p><img src="../assets/ex011.png" alt/></p><p>Note that the order of the plots is not relevant, i.e. we would get the same results with:</p><pre><code class="language-julia">@gp :- &quot;set multiplot layout 2,1&quot;
@gp :- 2 &quot;p $name u 1:((f(\$1)-\$2) / \$3):(1) w errorbars t &#39;Resid. [{/Symbol s}]&#39;&quot; @gp :- 2 &quot;p $name u 1:((f(\$1)-\$2) / \$3):(1) w errorbars t &#39;Resid. [{/Symbol s}]&#39;&quot;
@gp :- [extrema(x)...] [0,0] &quot;w l notit dt 2 lc rgb &#39;black&#39;&quot; # reference line @gp :- [extrema(x)...] [0,0] &quot;w l notit dt 2 lc rgb &#39;black&#39;&quot; # reference line
@gp :- 1 &quot;p $name w errorbars t &#39;Data&#39;&quot; @gp :- 1 &quot;p $name w errorbars t &#39;Data&#39;&quot;
@gp :- &quot;p $name u 1:(f(\$1)) w l t &#39;Best fit model&#39;&quot;</code></pre><h3 id="Mixing-2D-and-3D-plots-1"><a class="docs-heading-anchor" href="#Mixing-2D-and-3D-plots-1">Mixing 2D and 3D plots</a><a class="docs-heading-anchor-permalink" href="#Mixing-2D-and-3D-plots-1" title="Permalink"></a></h3><p>A multiplot can also mix 2D and 3D plots:</p><pre><code class="language-julia">x = y = -10:0.33:10 @gp :- &quot;p $name u 1:(f(\$1)) w l t &#39;Best fit model&#39;&quot;</code></pre><h3 id="Mixing-2D-and-3D-plots-1"><a class="docs-heading-anchor" href="#Mixing-2D-and-3D-plots-1">Mixing 2D and 3D plots</a><a class="docs-heading-anchor-permalink" href="#Mixing-2D-and-3D-plots-1" title="Permalink"></a></h3><p>A multiplot can also mix 2D and 3D plots:</p><pre><code class="language-julia">x = y = -10:0.33:10
@gp &quot;set multiplot layout 1,2&quot; @gp &quot;set multiplot layout 1,2&quot;
@ -38,7 +38,7 @@ fxy = [sinc2d(x,y) for x in x, y in y]
@gsp :- 2 x y fxy &quot;w pm3d notit&quot;</code></pre><p><img src="../assets/ex012.png" alt/></p><h2 id="Multiple-sessions-1"><a class="docs-heading-anchor" href="#Multiple-sessions-1">Multiple sessions</a><a class="docs-heading-anchor-permalink" href="#Multiple-sessions-1" title="Permalink"></a></h2><p><strong>Gnuplot.jl</strong> can handle multiple sessions, i.e. multiple gnuplot processes running simultaneously. Each session is identified by an ID (<code>sid::Symbol</code>, in the documentation).</p><p>In order to redirect commands to a specific session simply insert a symbol into your <code>@gp</code> or <code>@gsp</code> call, e.g.:</p><pre><code class="language-julia">@gp :GP1 &quot;plot sin(x)&quot; # opens first window @gsp :- 2 x y fxy &quot;w pm3d notit&quot;</code></pre><p><img src="../assets/ex012.png" alt/></p><h2 id="Multiple-sessions-1"><a class="docs-heading-anchor" href="#Multiple-sessions-1">Multiple sessions</a><a class="docs-heading-anchor-permalink" href="#Multiple-sessions-1" title="Permalink"></a></h2><p><strong>Gnuplot.jl</strong> can handle multiple sessions, i.e. multiple gnuplot processes running simultaneously. Each session is identified by an ID (<code>sid::Symbol</code>, in the documentation).</p><p>In order to redirect commands to a specific session simply insert a symbol into your <code>@gp</code> or <code>@gsp</code> call, e.g.:</p><pre><code class="language-julia">@gp :GP1 &quot;plot sin(x)&quot; # opens first window
@gp :GP2 &quot;plot sin(x)&quot; # opens secondo window @gp :GP2 &quot;plot sin(x)&quot; # opens secondo window
@gp :- :GP1 &quot;plot cos(x)&quot; # add a plot on first window</code></pre><p>The session ID can appear in every position in the argument list, but only one ID can be present in each call. If the session ID is not specified the <code>:default</code> session is considered.</p><p>The names of all current sessions can be retrieved with <a href="../api/#Gnuplot.session_names"><code>session_names()</code></a>:</p><pre><code class="language-julia-repl">julia&gt; println(session_names()) @gp :- :GP1 &quot;plot cos(x)&quot; # add a plot on first window</code></pre><p>The session ID can appear in every position in the argument list, but only one ID can be present in each call. If the session ID is not specified the <code>:default</code> session is considered.</p><p>The names of all current sessions can be retrieved with <a href="../api/#Gnuplot.session_names"><code>session_names()</code></a>:</p><pre><code class="language-julia-repl">julia&gt; println(session_names())
Symbol[:default, :GP1, :GP2]</code></pre><p>To quit a specific session use <a href="../api/#Gnuplot.quit"><code>Gnuplot.quit()</code></a>:</p><pre><code class="language-julia-repl">julia&gt; Gnuplot.quit(:GP1) [:default, :GP1, :GP2]</code></pre><p>To quit a specific session use <a href="../api/#Gnuplot.quit"><code>Gnuplot.quit()</code></a>:</p><pre><code class="language-julia-repl">julia&gt; Gnuplot.quit(:GP1)
0</code></pre><p>The output value is the exit status of the underlying gnuplot process.</p><p>You may also quit all active sessions at once with <a href="../api/#Gnuplot.quitall"><code>Gnuplot.quitall()</code></a>:</p><pre><code class="language-julia-repl">julia&gt; Gnuplot.quitall()</code></pre><h2 id="Histograms-1"><a class="docs-heading-anchor" href="#Histograms-1">Histograms</a><a class="docs-heading-anchor-permalink" href="#Histograms-1" title="Permalink"></a></h2><p><strong>Gnuplot.jl</strong> provides facilities to compute and display histograms, through the <a href="../api/#Gnuplot.hist"><code>hist()</code></a> function. E.g., to quickly preview an histogram:</p><pre><code class="language-julia">x = randn(1000); 0</code></pre><p>The output value is the exit status of the underlying gnuplot process.</p><p>You may also quit all active sessions at once with <a href="../api/#Gnuplot.quitall"><code>Gnuplot.quitall()</code></a>:</p><pre><code class="language-julia-repl">julia&gt; Gnuplot.quitall()</code></pre><h2 id="Histograms-1"><a class="docs-heading-anchor" href="#Histograms-1">Histograms</a><a class="docs-heading-anchor-permalink" href="#Histograms-1" title="Permalink"></a></h2><p><strong>Gnuplot.jl</strong> provides facilities to compute and display histograms, through the <a href="../api/#Gnuplot.hist"><code>hist()</code></a> function. E.g., to quickly preview an histogram:</p><pre><code class="language-julia">x = randn(1000);
@gp hist(x)</code></pre><p><img src="../assets/ex013a.png" alt/></p><p>A finer control on the output is achieved by setting the range to consider (<code>range=</code> keyword) and either the bin size (<code>bs=</code>) or the total number of bins (<code>nbins=</code>) in the histogram. See <a href="../api/#Gnuplot.hist"><code>hist()</code></a> documentation for further information.</p><p>Moreover, the <a href="../api/#Gnuplot.hist"><code>hist()</code></a> return a <a href="../api/#Gnuplot.Histogram1D"><code>Gnuplot.Histogram1D</code></a> structure, whose content can be exploited to customize histogram appearence, e.g.:</p><pre><code class="language-julia">x = randn(1000); @gp hist(x)</code></pre><p><img src="../assets/ex013a.png" alt/></p><p>A finer control on the output is achieved by setting the range to consider (<code>range=</code> keyword) and either the bin size (<code>bs=</code>) or the total number of bins (<code>nbins=</code>) in the histogram. See <a href="../api/#Gnuplot.hist"><code>hist()</code></a> documentation for further information.</p><p>Moreover, the <a href="../api/#Gnuplot.hist"><code>hist()</code></a> return a <a href="../api/#Gnuplot.Histogram1D"><code>Gnuplot.Histogram1D</code></a> structure, whose content can be exploited to customize histogram appearence, e.g.:</p><pre><code class="language-julia">x = randn(1000);
h = hist(x, range=3 .* [-1,1], bs=0.5) h = hist(x, range=3 .* [-1,1], bs=0.5)
@ -47,14 +47,14 @@ y = randn(10_000)
@gp &quot;set size ratio -1&quot; hist(x, y)</code></pre><p><img src="../assets/ex014a.png" alt/></p><p>Again, a finer control can be achieved by specifying ranges, bin size or number of bins (along both dimensions) and by explicitly using the content of the returned <a href="../api/#Gnuplot.Histogram2D"><code>Gnuplot.Histogram2D</code></a> structure:</p><pre><code class="language-julia">h = hist(x, y, bs1=0.25, nbins2=20, range1=[-3,3], range2=[-3,3]) @gp &quot;set size ratio -1&quot; hist(x, y)</code></pre><p><img src="../assets/ex014a.png" alt/></p><p>Again, a finer control can be achieved by specifying ranges, bin size or number of bins (along both dimensions) and by explicitly using the content of the returned <a href="../api/#Gnuplot.Histogram2D"><code>Gnuplot.Histogram2D</code></a> structure:</p><pre><code class="language-julia">h = hist(x, y, bs1=0.25, nbins2=20, range1=[-3,3], range2=[-3,3])
@gp &quot;set size ratio -1&quot; h.bins1 h.bins2 h.counts &quot;w image notit&quot;</code></pre><p><img src="../assets/ex014b.png" alt/></p><p>Alternatively, 2D histograms may be displayed using the <code>boxxyerror</code> plot style which allows more flexibility in, e.g., handling transparencies and drawing the histogram grid. In this case the data can be prepared using the <a href="../api/#Gnuplot.boxxyerror"><code>boxxyerror()</code></a> function, as follows:</p><pre><code class="language-julia">box = boxxyerror(h.bins1, h.bins2, cartesian=true) @gp &quot;set size ratio -1&quot; h.bins1 h.bins2 h.counts &quot;w image notit&quot;</code></pre><p><img src="../assets/ex014b.png" alt/></p><p>Alternatively, 2D histograms may be displayed using the <code>boxxyerror</code> plot style which allows more flexibility in, e.g., handling transparencies and drawing the histogram grid. In this case the data can be prepared using the <a href="../api/#Gnuplot.boxxyerror"><code>boxxyerror()</code></a> function, as follows:</p><pre><code class="language-julia">box = boxxyerror(h.bins1, h.bins2, cartesian=true)
@gp &quot;set size ratio -1&quot; &quot;set style fill solid 0.5 border lc rgb &#39;gray&#39;&quot; :- @gp &quot;set size ratio -1&quot; &quot;set style fill solid 0.5 border lc rgb &#39;gray&#39;&quot; :-
@gp :- box... h.counts &quot;w boxxyerror notit lc pal&quot;</code></pre><p><img src="../assets/ex014c.png" alt/></p><h2 id="Contour-lines-1"><a class="docs-heading-anchor" href="#Contour-lines-1">Contour lines</a><a class="docs-heading-anchor-permalink" href="#Contour-lines-1" title="Permalink"></a></h2><p>Although gnuplot already handles contours by itself (with the <code>set contour</code> command), <strong>Gnuplot.jl</strong> provides a way to calculate contour lines paths before displaying them, using the <a href="../api/#Gnuplot.contourlines"><code>contourlines()</code></a> function. We may use it for, e.g., plot contour lines with customized widths and palette, according to their z level. Continuing previous example:</p><pre><code class="language-julia">clines = contourlines(h.bins1, h.bins2, h.counts, cntrparam=&quot;levels discrete 10, 30, 60, 90&quot;); @gp :- box... h.counts &quot;w boxxyerror notit lc pal&quot;</code></pre><p><img src="../assets/ex014c.png" alt/></p><h2 id="Contour-lines-1"><a class="docs-heading-anchor" href="#Contour-lines-1">Contour lines</a><a class="docs-heading-anchor-permalink" href="#Contour-lines-1" title="Permalink"></a></h2><p>Although gnuplot already handles contours by itself (with the <code>set contour</code> command), <strong>Gnuplot.jl</strong> provides a way to calculate contour lines paths before displaying them, using the <a href="../api/#Gnuplot.contourlines"><code>contourlines()</code></a> function. We may use it for, e.g., plot contour lines with customized widths and palette, according to their z level. Continuing with the previous example:</p><pre><code class="language-julia">clines = contourlines(h.bins1, h.bins2, h.counts, cntrparam=&quot;levels discrete 10, 30, 60, 90&quot;);
for i in 1:length(clines) for i in 1:length(clines)
@gp :- clines[i].data &quot;w l t &#39;$(clines[i].z)&#39; lw $i lc pal&quot; :- @gp :- clines[i].data &quot;w l t &#39;$(clines[i].z)&#39; lw $i lc pal&quot; :-
end end
@gp :- key=&quot;outside top center box horizontal&quot;</code></pre><p><img src="../assets/ex014d.png" alt/></p><h2 id="Animations-1"><a class="docs-heading-anchor" href="#Animations-1">Animations</a><a class="docs-heading-anchor-permalink" href="#Animations-1" title="Permalink"></a></h2><p>The <a href="#Multiplot-1">Multiplot</a> capabilities can also be used to stack plots one above the other in order to create an animation, as in the following example:</p><pre><code class="language-julia">x = y = -10:0.33:10 @gp :- key=&quot;outside top center box horizontal&quot;</code></pre><p><img src="../assets/ex014d.png" alt/></p><h2 id="Animations-1"><a class="docs-heading-anchor" href="#Animations-1">Animations</a><a class="docs-heading-anchor-permalink" href="#Animations-1" title="Permalink"></a></h2><p>The <a href="#Multiplot-1">Multiplot</a> capabilities can also be used to stack plots one above the other in order to create an animation, as in the following example:</p><pre><code class="language-julia">x = y = -10:0.33:10
fz(x,y) = sin.(sqrt.(x.^2 + y.^2))./sqrt.(x.^2+y.^2) fz(x,y) = sin.(sqrt.(x.^2 + y.^2))./sqrt.(x.^2+y.^2)
fxy = [fz(x,y) for x in x, y in y] fxy = [fz(x,y) for x in x, y in y]
@gsp &quot;set xyplane at 0&quot; &quot;unset colorbox&quot; cb=[-1,1] zr=[-1,1] @gsp &quot;set xyplane at 0&quot; &quot;unset colorbox&quot; cbr=[-1,1] zr=[-1,1]
frame = 0 frame = 0
for direction in [-1,1] for direction in [-1,1]
for factor in -1:0.1:1 for factor in -1:0.1:1
@ -92,4 +92,4 @@ GNUPLOT (default) set output &#39;output.png&#39;
GNUPLOT (default) plot \ GNUPLOT (default) plot \
$data1 w l t &#39;Parabola&#39; $data1 w l t &#39;Parabola&#39;
GNUPLOT (default) set output GNUPLOT (default) set output
GNUPLOT (default) set term wxt 0 enhanced</code></pre><p>Each line reports the package name (<code>GNUPLOT</code>), the session name (<code>default</code>), the command or string being sent to gnuplot process, and the returned response (line starting with <code>-&gt;</code>). Default value is <code>false</code>;</p><ul><li><p><code>cmd::String</code>: command to start the gnuplot process, default value is <code>&quot;gnuplot&quot;</code>. If you need to specify a custom path to the gnuplot executable you may change this value;</p></li><li><p><code>default::Symbol</code>: default session name, i.e. the session that will be used when no session name is provided;</p></li><li><p><code>preferred_format::Symbol</code>: preferred format to send data to gnuplot. Value must be one of:</p><ul><li><code>bin</code>: provides best performances for large datasets, but uses temporary files;</li><li><code>text</code>: may be slow for large datasets, but no temporary file is involved;</li><li><code>auto</code> (default) automatically choose the best strategy.</li></ul></li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../basic/">« Basic usage</a><a class="docs-footer-nextpage" href="../style/">Style guide »</a></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Thursday 2 April 2020 15:25">Thursday 2 April 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> GNUPLOT (default) set term wxt 0 enhanced</code></pre><p>Each line reports the package name (<code>GNUPLOT</code>), the session name (<code>default</code>), the command or string being sent to gnuplot process, and the returned response (line starting with <code>-&gt;</code>). Default value is <code>false</code>;</p><ul><li><p><code>cmd::String</code>: command to start the gnuplot process, default value is <code>&quot;gnuplot&quot;</code>. If you need to specify a custom path to the gnuplot executable you may change this value;</p></li><li><p><code>default::Symbol</code>: default session name, i.e. the session that will be used when no session name is provided;</p></li><li><p><code>preferred_format::Symbol</code>: preferred format to send data to gnuplot. Value must be one of:</p><ul><li><code>bin</code>: provides best performances for large datasets, but uses temporary files;</li><li><code>text</code>: may be slow for large datasets, but no temporary file is involved;</li><li><code>auto</code> (default) automatically choose the best strategy.</li></ul></li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../basic/">« Basic usage</a><a class="docs-footer-nextpage" href="../style/">Style guide »</a></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 8 April 2020 00:09">Wednesday 8 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 370 KiB

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · Gnuplot.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="Gnuplot.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">Gnuplot.jl</span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../install/">Installation</a></li><li><a class="tocitem" href="../basic/">Basic usage</a></li><li><a class="tocitem" href="../advanced/">Advanced usage</a></li><li><a class="tocitem" href="../style/">Style guide</a></li><li><a class="tocitem" href="../terminals/">Gnuplot terminals</a></li><li><a class="tocitem" href="../examples/">Examples</a></li><li><a class="tocitem" href="../api/">API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Thursday 2 April 2020 15:25">Thursday 2 April 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html> <html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · Gnuplot.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="Gnuplot.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">Gnuplot.jl</span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../install/">Installation</a></li><li><a class="tocitem" href="../basic/">Basic usage</a></li><li><a class="tocitem" href="../advanced/">Advanced usage</a></li><li><a class="tocitem" href="../style/">Style guide</a></li><li><a class="tocitem" href="../terminals/">Gnuplot terminals</a></li><li><a class="tocitem" href="../examples/">Examples</a></li><li><a class="tocitem" href="../api/">API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 8 April 2020 00:09">Wednesday 8 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html>

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Style guide · Gnuplot.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="Gnuplot.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">Gnuplot.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../install/">Installation</a></li><li><a class="tocitem" href="../basic/">Basic usage</a></li><li><a class="tocitem" href="../advanced/">Advanced usage</a></li><li class="is-active"><a class="tocitem" href>Style guide</a></li><li><a class="tocitem" href="../terminals/">Gnuplot terminals</a></li><li><a class="tocitem" href="../examples/">Examples</a></li><li><a class="tocitem" href="../api/">API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Style guide</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Style guide</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/gcalderone/Gnuplot.jl/blob/master/docs/src/style.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Style-Guide-1"><a class="docs-heading-anchor" href="#Style-Guide-1">Style Guide</a><a class="docs-heading-anchor-permalink" href="#Style-Guide-1" title="Permalink"></a></h1><p>The <strong>Gnuplot.jl</strong> loose syntax allows to create a plot using very different approaches. While this was one of the initial purposes for the package, it may lead to decreased code readability if not used judiciously.</p><p>Here I will summarize a few, non-mandatory, guidelines which allows to maintain a neat syntax and a high readability:</p><h3 id="Use-macros-without-parentheses-and-commas:-1"><a class="docs-heading-anchor" href="#Use-macros-without-parentheses-and-commas:-1">1 - Use macros without parentheses and commas:</a><a class="docs-heading-anchor-permalink" href="#Use-macros-without-parentheses-and-commas:-1" title="Permalink"></a></h3><p>The two most important symbols exported by the package (<code>@gp</code> and <code>@gsp</code>) are macros. As such they are supposed to be invoked without parentheses and commas. E.g. use:</p><pre><code class="language-julia">@gp x y &quot;with lines&quot;</code></pre><p>in place of </p><pre><code class="language-julia">@gp(x, y, &quot;with lines&quot;)</code></pre><p>If you have very long lines you may split them in multiple statements using the <code>:-</code> symbol, which resembles both hyphenation in natural language and indentation for the plot-producing code:</p><pre><code class="language-julia">@gp &quot;set grid&quot; :- <html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Style guide · Gnuplot.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="Gnuplot.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">Gnuplot.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../install/">Installation</a></li><li><a class="tocitem" href="../basic/">Basic usage</a></li><li><a class="tocitem" href="../advanced/">Advanced usage</a></li><li class="is-active"><a class="tocitem" href>Style guide</a></li><li><a class="tocitem" href="../terminals/">Gnuplot terminals</a></li><li><a class="tocitem" href="../examples/">Examples</a></li><li><a class="tocitem" href="../api/">API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Style guide</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Style guide</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/gcalderone/Gnuplot.jl/blob/master/docs/src/style.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Style-Guide-1"><a class="docs-heading-anchor" href="#Style-Guide-1">Style Guide</a><a class="docs-heading-anchor-permalink" href="#Style-Guide-1" title="Permalink"></a></h1><p>The <strong>Gnuplot.jl</strong> loose syntax allows to create a plot using very different approaches. While this was one of the initial purposes for the package, it may lead to decreased code readability if not used judiciously.</p><p>Here I will summarize a few, non-mandatory, guidelines which allows to maintain a neat syntax and a high readability:</p><h3 id="Use-macros-without-parentheses-and-commas:-1"><a class="docs-heading-anchor" href="#Use-macros-without-parentheses-and-commas:-1">1 - Use macros without parentheses and commas:</a><a class="docs-heading-anchor-permalink" href="#Use-macros-without-parentheses-and-commas:-1" title="Permalink"></a></h3><p>The two most important symbols exported by the package (<code>@gp</code> and <code>@gsp</code>) are macros. As such they are supposed to be invoked without parentheses and commas. E.g. use:</p><pre><code class="language-julia">@gp x y &quot;with lines&quot;</code></pre><p>in place of</p><pre><code class="language-julia">@gp(x, y, &quot;with lines&quot;)</code></pre><p>If you have very long lines you may split them in multiple statements using the <code>:-</code> symbol, which resembles both hyphenation in natural language and indentation for the plot-producing code:</p><pre><code class="language-julia">@gp &quot;set grid&quot; :-
@gp :- x y &quot;with lines&quot;</code></pre><p>Note that the trailing <code>:-</code> symbol is not mandatory. If omitted, the plot will be updated at each statement (rather than at the last one).</p><h3 id="Use-keywords-in-place-of-gnuplot-commands:-1"><a class="docs-heading-anchor" href="#Use-keywords-in-place-of-gnuplot-commands:-1">2 - Use keywords in place of gnuplot commands:</a><a class="docs-heading-anchor-permalink" href="#Use-keywords-in-place-of-gnuplot-commands:-1" title="Permalink"></a></h3><p>As discussed in <a href="../basic/#Keywords-for-common-commands-1">Keywords for common commands</a> several commonly used gnuplot commands can be replaced with a keyword. E.g. you can use</p><pre><code class="language-julia">@gp ... xrange=[-1,5] ...</code></pre><p>in place of </p><pre><code class="language-julia">@gp ... &quot;set xrange [-1:5]&quot; ...</code></pre><p>This help reducing the number of strings used in the code, as well as the associated interpolating characters (<code>$</code>), and results in a more concise syntax.</p><h3 id="Use-abbreviations-for-commands-and-keywords:-1"><a class="docs-heading-anchor" href="#Use-abbreviations-for-commands-and-keywords:-1">3 - Use abbreviations for commands and keywords:</a><a class="docs-heading-anchor-permalink" href="#Use-abbreviations-for-commands-and-keywords:-1" title="Permalink"></a></h3><p>Many gnuplot commands, as well as all keywords (see <a href="../basic/#Keywords-for-common-commands-1">Keywords for common commands</a>, can be abbreviated as long as the abbreviation is unambiguous. E.g., the following code:</p><pre><code class="language-julia">@gp &quot;set grid&quot; &quot;set key left&quot; &quot;set logscale y&quot; @gp :- x y &quot;with lines&quot;</code></pre><p>Note that the trailing <code>:-</code> symbol is not mandatory. If omitted, the plot will be updated at each statement (rather than at the last one).</p><h3 id="Use-keywords-in-place-of-gnuplot-commands:-1"><a class="docs-heading-anchor" href="#Use-keywords-in-place-of-gnuplot-commands:-1">2 - Use keywords in place of gnuplot commands:</a><a class="docs-heading-anchor-permalink" href="#Use-keywords-in-place-of-gnuplot-commands:-1" title="Permalink"></a></h3><p>As discussed in <a href="../basic/#Keywords-for-common-commands-1">Keywords for common commands</a> several commonly used gnuplot commands can be replaced with a keyword. E.g. you can use</p><pre><code class="language-julia">@gp ... xrange=[-1,5] ...</code></pre><p>in place of</p><pre><code class="language-julia">@gp ... &quot;set xrange [-1:5]&quot; ...</code></pre><p>This help reducing the number of strings, as well as the associated interpolating characters (<code>$</code>), and results in a more concise syntax.</p><h3 id="Use-abbreviations-for-commands-and-keywords:-1"><a class="docs-heading-anchor" href="#Use-abbreviations-for-commands-and-keywords:-1">3 - Use abbreviations for commands and keywords:</a><a class="docs-heading-anchor-permalink" href="#Use-abbreviations-for-commands-and-keywords:-1" title="Permalink"></a></h3><p>Many gnuplot commands, as well as all keywords (see <a href="../basic/#Keywords-for-common-commands-1">Keywords for common commands</a>), can be abbreviated as long as the abbreviation is unambiguous. E.g., the following code:</p><pre><code class="language-julia">@gp &quot;set grid&quot; &quot;set key left&quot; &quot;set logscale y&quot;
@gp :- &quot;set title &#39;Plot title&#39;&quot; &quot;set label &#39;X label&#39;&quot; &quot;set xrange [0:*]&quot; @gp :- &quot;set title &#39;Plot title&#39;&quot; &quot;set label &#39;X label&#39;&quot; &quot;set xrange [0:*]&quot;
@gp :- x y &quot;with lines&quot;</code></pre><p>can be replaced with a shorter version:</p><pre><code class="language-julia">@gp &quot;set grid&quot; k=&quot;left&quot; ylog=true @gp :- x y &quot;with lines&quot;</code></pre><p>can be replaced with a shorter version:</p><pre><code class="language-julia">@gp &quot;set grid&quot; k=&quot;left&quot; ylog=true
@gp :- tit=&quot;Plot title&quot; xlab=&quot;X label&quot; xr=[0,NaN] @gp :- tit=&quot;Plot title&quot; xlab=&quot;X label&quot; xr=[0,NaN]
@gp :- x y &quot;w l&quot;</code></pre><p>Besides being more idiomatic, the possibility to exploit abbreviations is of great importance when performing interactive data exploration.</p><p>Moreover, in many gnuplot examples and documentation it is very common to use abbreviations (i.e. <code>w l</code> in place of <code>with lines</code>) so there is no reason to avoid them in <strong>Gnuplot.jl</strong>.</p><h3 id="If-possible,-follow-the-*commands*-*data*-*plot-specs*-order-1"><a class="docs-heading-anchor" href="#If-possible,-follow-the-*commands*-*data*-*plot-specs*-order-1">4 - If possible, follow the <em>commands</em> -&gt; <em>data</em> + <em>plot specs</em> order</a><a class="docs-heading-anchor-permalink" href="#If-possible,-follow-the-*commands*-*data*-*plot-specs*-order-1" title="Permalink"></a></h3><p>The two following examples produce exactly the same plot:</p><pre><code class="language-julia">x = -10.:10 @gp :- x y &quot;w l&quot;</code></pre><p>Besides being more idiomatic, the possibility to exploit abbreviations is of great importance when performing interactive data exploration.</p><p>Moreover, in many gnuplot examples and documentation it is very common to use abbreviations (i.e. <code>w l</code> in place of <code>with lines</code>) so there is no reason to avoid them in <strong>Gnuplot.jl</strong>.</p><h3 id="If-possible,-follow-the-*commands*-*data*-*plot-specs*-order-1"><a class="docs-heading-anchor" href="#If-possible,-follow-the-*commands*-*data*-*plot-specs*-order-1">4 - If possible, follow the <em>commands</em> -&gt; <em>data</em> + <em>plot specs</em> order</a><a class="docs-heading-anchor-permalink" href="#If-possible,-follow-the-*commands*-*data*-*plot-specs*-order-1" title="Permalink"></a></h3><p>The two following examples produce exactly the same plot:</p><pre><code class="language-julia">x = -10.:10
@gp &quot;set grid&quot; &quot;set multiplot layout 2,1&quot; @gp &quot;set grid&quot; &quot;set multiplot layout 2,1&quot;
@gp :- 1 x x.^2 &quot;w l t &#39;f(x) = x^2&quot; # first plot @gp :- 1 x x.^2 &quot;w l t &#39;f(x) = x^2&quot; # first plot
@gp :- 2 x x.^3 &quot;w l t &#39;f(x) = x^3&quot; # second plot</code></pre><p>and</p><pre><code class="language-julia">@gp 2 x x.^3 &quot;w l t &#39;f(x) = x^3&quot; # second plot @gp :- 2 x x.^3 &quot;w l t &#39;f(x) = x^3&quot; # second plot</code></pre><p>and</p><pre><code class="language-julia">@gp 2 x x.^3 &quot;w l t &#39;f(x) = x^3&quot; # second plot
@gp :- 1 x x.^2 &quot;w l t &#39;f(x) = x^2&quot; # first plot @gp :- 1 x x.^2 &quot;w l t &#39;f(x) = x^2&quot; # first plot
@ -15,4 +15,4 @@
@gp :- &quot;set offsets graph .05, graph .05, graph .05, graph .05&quot; @gp :- &quot;set offsets graph .05, graph .05, graph .05, graph .05&quot;
@gp :- &quot;set border lw 1 lc rgb &#39;white&#39;&quot;</code></pre><p>join them in a single string using triple quotes and <code>;</code></p><pre><code class="language-julia">@gp :- &quot;&quot;&quot;set key off; set auto fix; set size square; @gp :- &quot;set border lw 1 lc rgb &#39;white&#39;&quot;</code></pre><p>join them in a single string using triple quotes and <code>;</code></p><pre><code class="language-julia">@gp :- &quot;&quot;&quot;set key off; set auto fix; set size square;
set offsets graph .05, graph .05, graph .05, graph .05; set offsets graph .05, graph .05, graph .05, graph .05;
set border lw 1 lc rgb &#39;white&#39;; &quot;&quot;&quot;</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../advanced/">« Advanced usage</a><a class="docs-footer-nextpage" href="../terminals/">Gnuplot terminals »</a></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Thursday 2 April 2020 15:25">Thursday 2 April 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> set border lw 1 lc rgb &#39;white&#39;; &quot;&quot;&quot;</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../advanced/">« Advanced usage</a><a class="docs-footer-nextpage" href="../terminals/">Gnuplot terminals »</a></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 8 April 2020 00:09">Wednesday 8 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

View File

@ -24,4 +24,4 @@ save(term=&quot;cairolatex pdf input color dashed size 5in,3.3in&quot;, output=&
\begin{figure} \begin{figure}
\input{test.tex} \input{test.tex}
\end{figure} \end{figure}
\end{document}</code></pre><p>And the output is: <img src="../assets/cairolatex.png" alt/></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../style/">« Style guide</a><a class="docs-footer-nextpage" href="../examples/">Examples »</a></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Thursday 2 April 2020 15:25">Thursday 2 April 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> \end{document}</code></pre><p>And the output is: <img src="../assets/cairolatex.png" alt/></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../style/">« Style guide</a><a class="docs-footer-nextpage" href="../examples/">Examples »</a></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 8 April 2020 00:09">Wednesday 8 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>