This commit is contained in:
Giorgio Calderone 2020-04-18 16:21:31 +02:00
parent 7c58fc7ab3
commit 4df652124b
26 changed files with 71 additions and 52 deletions

View File

@ -17,9 +17,9 @@ name = "\$MyDataSet1"
a = vars.a, a = vars.a,
b = vars.b, b = vars.b,
c = vars.c)</code></pre><pre><code class="language-none">┌ Info: Best fit values: c = vars.c)</code></pre><pre><code class="language-none">┌ Info: Best fit values:
│ a = 1.49358345451425 │ a = 1.4697928313124
│ b = 0.297338855330415 │ b = 0.32380674639466
└ c = 0.704689661505663</code></pre><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>Recycling data from 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;f(x) = a * sin(b + c*x)&quot; └ c = 0.69649253012739</code></pre><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>Recycling data from 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;f(x) = a * sin(b + c*x)&quot;
@gp :- &quot;a=$(vars.a)&quot; &quot;b=$(vars.b)&quot; &quot;c=$(vars.c)&quot; @gp :- &quot;a=$(vars.a)&quot; &quot;b=$(vars.b)&quot; &quot;c=$(vars.c)&quot;
@gp :- name=&gt;(x, y, err) @gp :- name=&gt;(x, y, err)
@gp :- &quot;set multiplot layout 2,1&quot; @gp :- &quot;set multiplot layout 2,1&quot;
@ -33,7 +33,7 @@ name = &quot;\$MyDataSet1&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><h2 id="Customized-layout-1"><a class="docs-heading-anchor" href="#Customized-layout-1">Customized layout</a><a class="docs-heading-anchor-permalink" href="#Customized-layout-1" title="Permalink"></a></h2><p>It is also possible to customize the plot layout using the margin keywords (see <a href="#Histograms-1">Histograms</a> for further info):</p><pre><code class="language-julia"># Generate random numbers @gp :- &quot;p $name u 1:(f(\$1)) w l t &#39;Best fit model&#39;&quot;</code></pre><h2 id="Customized-layout-1"><a class="docs-heading-anchor" href="#Customized-layout-1">Customized layout</a><a class="docs-heading-anchor-permalink" href="#Customized-layout-1" title="Permalink"></a></h2><p>It is also possible to customize the plot layout using the margin keywords (see <a href="#Histograms-1">Histograms</a> for further info on how to generate andi display histograms):</p><pre><code class="language-julia"># Generate random numbers
x = randn(1000); x = randn(1000);
y = randn(1000); y = randn(1000);
@ -79,18 +79,26 @@ fxy = [sinc2d(x,y) for x in x, y in y]
@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 used.</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 used.</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())
[: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 a facility to compute (see <a href="../api/#Gnuplot.hist"><code>hist()</code></a> function) an histogram. It allows to set 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) and return a <a href="../api/#Gnuplot.Histogram1D"><code>Gnuplot.Histogram1D</code></a> structure, whose content can be visualized as follows:</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, e.g.:</p><pre><code class="language-julia">x = randn(1000);
@gp hist(x)</code></pre><p><img src="../assets/advanced013a.png" alt/></p><p>The <a href="../api/#Gnuplot.hist"><code>hist()</code></a> function also accept keywords to set 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. A finer control on the output is achieved by exploiting the fields of the returned (<a href="../api/#Gnuplot.Histogram1D"><code>Gnuplot.Histogram1D</code></a>) structure, 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)
@gp h.bins h.counts &quot;w histep t &#39;Data&#39; lc rgb &#39;red&#39;&quot;</code></pre><p><img src="../assets/advanced013b.png" alt/></p><p><strong>Gnuplot.jl</strong> also allows to compute 2D histograms by passing two vectors (with the same lengths) to <a href="../api/#Gnuplot.hist"><code>hist()</code></a>. 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">x = randn(10_000) @gp h.bins h.counts &quot;w histep t &#39;Data&#39; lc rgb &#39;red&#39;&quot;</code></pre><p><img src="../assets/advanced013b.png" alt/></p><p>The <a href="../api/#Gnuplot.hist"><code>hist()</code></a> function compute also 2D histograms by passing two vectors (with the same lengths), e.g.: </p><pre><code class="language-julia">x = randn(10_000)
y = randn(10_000)
h = hist(x, y)
@gp h</code></pre><p><img src="../assets/advanced014a.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">x = randn(10_000)
y = randn(10_000) y = randn(10_000)
h = hist(x, y, bs1=0.25, nbins2=20, range1=[-3,3], range2=[-3,3]) 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/advanced014b.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/advanced014b.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.boxxy"><code>boxxy()</code></a> function, as follows:</p><pre><code class="language-julia">@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 :- boxxy(h) &quot;w boxxy notit lc pal&quot;</code></pre><p><img src="../assets/advanced014c.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 preview such lines with:</p><pre><code class="language-julia">x = randn(10_000)
@gp :- box... h.counts &quot;w boxxyerror notit lc pal&quot;</code></pre><p><img src="../assets/advanced014c.png" alt/></p><p>See also <a href="../recipes/#Histogram-recipes-1">Histogram recipes</a> for a quicker way to preview histogram plots.</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;); y = randn(10_000)
h = hist(x, y)
clines = contourlines(h, &quot;levels discrete 10, 30, 60, 90&quot;);
@gp clines</code></pre><p><img src="../assets/advanced014d.png" alt/></p><p>By exploiting the fields of the <a href="../api/#Gnuplot.IsoContourLines"><code>Gnuplot.IsoContourLines</code></a> structure we may also customize line widths, colors and dashed pattern according to their z level, and plot them on top of the 2D histogram:</p><pre><code class="language-julia">@gp &quot;set size ratio -1&quot; &quot;set style fill solid 0.5 border lc rgb &#39;gray&#39;&quot; :-
@gp :- boxxy(h) &quot;w boxxy notit lc pal&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 dt $i lc pal&quot; :-
end end
@gp :- key=&quot;outside top center box horizontal&quot;</code></pre><p><img src="../assets/advanced014d.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/advanced014e.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; cbr=[-1,1] zr=[-1,1] @gsp &quot;set xyplane at 0&quot; &quot;unset colorbox&quot; cbr=[-1,1] zr=[-1,1]
@ -102,4 +110,4 @@ for direction in [-1,1]
end end
end end
@gsp</code></pre><p>Here the <code>frame</code> variable is used as multiplot index. The animation can be saved in a GIF file with:</p><pre><code class="language-julia">save(term=&quot;gif animate size 480,360 delay 5&quot;, output=&quot;assets/animation.gif&quot;)</code></pre><p><img src="../assets/animation.gif" alt/></p><h2 id="Direct-command-execution-1"><a class="docs-heading-anchor" href="#Direct-command-execution-1">Direct command execution</a><a class="docs-heading-anchor-permalink" href="#Direct-command-execution-1" title="Permalink"></a></h2><p>When gnuplot commands are passed to <code>@gp</code> or <code>@gsp</code> they are stored in a session for future use, or to be saved in <a href="../basic/#Gnuplot-scripts-1">Gnuplot scripts</a>. If you simply wish to execute a command without storing it in the session, and possibly retrieve a value, use <a href="../api/#Gnuplot.gpexec"><code>gpexec</code></a>. E.g., to retrieve the value of a gnuplot variable:</p><pre><code class="language-julia-repl">julia&gt; gpexec(&quot;print GPVAL_TERM&quot;) @gsp</code></pre><p>Here the <code>frame</code> variable is used as multiplot index. The animation can be saved in a GIF file with:</p><pre><code class="language-julia">save(term=&quot;gif animate size 480,360 delay 5&quot;, output=&quot;assets/animation.gif&quot;)</code></pre><p><img src="../assets/animation.gif" alt/></p><h2 id="Direct-command-execution-1"><a class="docs-heading-anchor" href="#Direct-command-execution-1">Direct command execution</a><a class="docs-heading-anchor-permalink" href="#Direct-command-execution-1" title="Permalink"></a></h2><p>When gnuplot commands are passed to <code>@gp</code> or <code>@gsp</code> they are stored in a session for future use, or to be saved in <a href="../basic/#Gnuplot-scripts-1">Gnuplot scripts</a>. If you simply wish to execute a command without storing it in the session, and possibly retrieve a value, use <a href="../api/#Gnuplot.gpexec"><code>gpexec</code></a>. E.g., to retrieve the value of a gnuplot variable:</p><pre><code class="language-julia-repl">julia&gt; gpexec(&quot;print GPVAL_TERM&quot;)
&quot;unknown&quot;</code></pre><p>You may also provide a session ID as first argument (see <a href="#Multiple-sessions-1">Multiple sessions</a>) to redirect the command to a specific session.</p><p>Alternatively you may start the <a href="#The-gnuplot-REPL-1">The gnuplot REPL</a> to type commands directly from the Julia prompt.</p><h2 id="The-gnuplot-REPL-1"><a class="docs-heading-anchor" href="#The-gnuplot-REPL-1">The gnuplot REPL</a><a class="docs-heading-anchor-permalink" href="#The-gnuplot-REPL-1" title="Permalink"></a></h2><p>The <strong>Gnuplot.jl</strong> package comes with a built-in REPL mode to directly send commands to the underlying gnuplot process. Since the REPL is a global resource, the gnuplot mode is not enabled by default. You can start it with:</p><pre><code class="language-julia">Gnuplot.repl_init(start_key=&#39;&gt;&#39;)</code></pre><p>The customizable <code>start_key</code> character is the key which triggers activation of the REPL mode. To quit the gnuplot REPL mode hit the <code>backspace</code> key.</p><h2 id="Dry-sessions-1"><a class="docs-heading-anchor" href="#Dry-sessions-1">Dry sessions</a><a class="docs-heading-anchor-permalink" href="#Dry-sessions-1" title="Permalink"></a></h2><p>A &quot;<em>dry session</em>&quot; is a session with no underlying gnuplot process. To enable dry sessions type:</p><pre><code class="language-julia">Gnuplot.options.dry = true;</code></pre><p>before starting a session (see also <a href="../options/#Options-1">Options</a>). Note that the <code>dry</code> option is a global one, i.e. it affects all sessions started after setting the option.</p><p>Clearly, no plot can be generated in dry sessions. Still, they are useful to run <strong>Gnuplot.jl</strong> code without raising errors (no attempt will be made to communicate with the underlying process). Moreover, <a href="../basic/#Gnuplot-scripts-1">Gnuplot scripts</a> can also be generated in a dry session, without the additional overhead of sending data to the gnuplot process.</p><p>If a gnuplot process can not be started the package will print a warning, and automatically enable dry sessions.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../basic/">« Basic usage</a><a class="docs-footer-nextpage" href="../options/">Package options »</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="Friday 17 April 2020 20:08">Friday 17 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> &quot;unknown&quot;</code></pre><p>You may also provide a session ID as first argument (see <a href="#Multiple-sessions-1">Multiple sessions</a>) to redirect the command to a specific session.</p><p>Alternatively you may start the <a href="#The-gnuplot-REPL-1">The gnuplot REPL</a> to type commands directly from the Julia prompt.</p><h2 id="The-gnuplot-REPL-1"><a class="docs-heading-anchor" href="#The-gnuplot-REPL-1">The gnuplot REPL</a><a class="docs-heading-anchor-permalink" href="#The-gnuplot-REPL-1" title="Permalink"></a></h2><p>The <strong>Gnuplot.jl</strong> package comes with a built-in REPL mode to directly send commands to the underlying gnuplot process. Since the REPL is a global resource, the gnuplot mode is not enabled by default. You can start it with:</p><pre><code class="language-julia">Gnuplot.repl_init(start_key=&#39;&gt;&#39;)</code></pre><p>The customizable <code>start_key</code> character is the key which triggers activation of the REPL mode. To quit the gnuplot REPL mode hit the <code>backspace</code> key.</p><h2 id="Dry-sessions-1"><a class="docs-heading-anchor" href="#Dry-sessions-1">Dry sessions</a><a class="docs-heading-anchor-permalink" href="#Dry-sessions-1" title="Permalink"></a></h2><p>A &quot;<em>dry session</em>&quot; is a session with no underlying gnuplot process. To enable dry sessions type:</p><pre><code class="language-julia">Gnuplot.options.dry = true;</code></pre><p>before starting a session (see also <a href="../options/#Options-1">Options</a>). Note that the <code>dry</code> option is a global one, i.e. it affects all sessions started after setting the option.</p><p>Clearly, no plot can be generated in dry sessions. Still, they are useful to run <strong>Gnuplot.jl</strong> code without raising errors (no attempt will be made to communicate with the underlying process). Moreover, <a href="../basic/#Gnuplot-scripts-1">Gnuplot scripts</a> can also be generated in a dry session, without the additional overhead of sending data to the gnuplot process.</p><p>If a gnuplot process can not be started the package will print a warning, and automatically enable dry sessions.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../basic/">« Basic usage</a><a class="docs-footer-nextpage" href="../options/">Package options »</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="Saturday 18 April 2020 15:11">Saturday 18 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: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

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: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -10,17 +10,17 @@
@gp :- x x &quot;w l tit &#39;Pow 1&#39; dt 1 lw 3 lc rgb &#39;blue&#39;&quot; @gp :- x x &quot;w l tit &#39;Pow 1&#39; dt 1 lw 3 lc rgb &#39;blue&#39;&quot;
@gp :- x x.^2 &quot;w l tit &#39;Pow 2&#39; dt 3 lw 2 lc rgb &#39;purple&#39;&quot;</code></pre><p><img src="../assets/basic006.png" alt/></p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>The above example lacks the trailing <code>:-</code> symbol. This means the plot will be updated at each command, adding one curve at a time.</p></div></div><hr/><h2 id="Keywords-for-common-commands-1"><a class="docs-heading-anchor" href="#Keywords-for-common-commands-1">Keywords for common commands</a><a class="docs-heading-anchor-permalink" href="#Keywords-for-common-commands-1" title="Permalink"></a></h2><p>In order to avoid typing long, and very frequently used gnuplot commands, <strong>Gnuplot.jl</strong> provides a few keywords which can be used in both <code>@gp</code> and <code>@sgp</code> calls:</p><ul><li><code>xrange=[low, high]</code> =&gt; <code>&quot;set xrange [low:high]</code>;</li><li><code>yrange=[low, high]</code> =&gt; <code>&quot;set yrange [low:high]</code>;</li><li><code>zrange=[low, high]</code> =&gt; <code>&quot;set zrange [low:high]</code>;</li><li><code>cbrange=[low, high]</code>=&gt; <code>&quot;set cbrange[low:high]</code>;</li><li><code>key=&quot;...&quot;</code> =&gt; <code>&quot;set key ...&quot;</code>;</li><li><code>title=&quot;...&quot;</code> =&gt; <code>&quot;set title \&quot;...\&quot;&quot;</code>;</li><li><code>xlabel=&quot;...&quot;</code> =&gt; <code>&quot;set xlabel \&quot;...\&quot;&quot;</code>;</li><li><code>ylabel=&quot;...&quot;</code> =&gt; <code>&quot;set ylabel \&quot;...\&quot;&quot;</code>;</li><li><code>zlabel=&quot;...&quot;</code> =&gt; <code>&quot;set zlabel \&quot;...\&quot;&quot;</code>;</li><li><code>cblabel=&quot;...&quot;</code> =&gt; <code>&quot;set cblabel \&quot;...\&quot;&quot;</code>;</li><li><code>xlog=true</code> =&gt; <code>set logscale x</code>;</li><li><code>ylog=true</code> =&gt; <code>set logscale y</code>;</li><li><code>zlog=true</code> =&gt; <code>set logscale z</code>;</li><li><code>margins=...</code> =&gt; <code>set margins ...</code>;</li><li><code>lmargin=...</code> =&gt; <code>set lmargin ...</code>;</li><li><code>rmargin=...</code> =&gt; <code>set rmargin ...</code>;</li><li><code>bmargin=...</code> =&gt; <code>set bmargin ...</code>;</li><li><code>tmargin=...</code> =&gt; <code>set tmargin ...</code>;</li></ul><p>All such keywords can be abbreviated to unambiguous names.</p><p>By using the above keywords the first lines of the previous example:</p><pre><code class="language-julia">@gp &quot;set grid&quot; &quot;set key left&quot; &quot;set logscale y&quot; @gp :- x x.^2 &quot;w l tit &#39;Pow 2&#39; dt 3 lw 2 lc rgb &#39;purple&#39;&quot;</code></pre><p><img src="../assets/basic006.png" alt/></p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>The above example lacks the trailing <code>:-</code> symbol. This means the plot will be updated at each command, adding one curve at a time.</p></div></div><hr/><h2 id="Keywords-for-common-commands-1"><a class="docs-heading-anchor" href="#Keywords-for-common-commands-1">Keywords for common commands</a><a class="docs-heading-anchor-permalink" href="#Keywords-for-common-commands-1" title="Permalink"></a></h2><p>In order to avoid typing long, and very frequently used gnuplot commands, <strong>Gnuplot.jl</strong> provides a few keywords which can be used in both <code>@gp</code> and <code>@sgp</code> calls:</p><ul><li><code>xrange=[low, high]</code> =&gt; <code>&quot;set xrange [low:high]</code>;</li><li><code>yrange=[low, high]</code> =&gt; <code>&quot;set yrange [low:high]</code>;</li><li><code>zrange=[low, high]</code> =&gt; <code>&quot;set zrange [low:high]</code>;</li><li><code>cbrange=[low, high]</code>=&gt; <code>&quot;set cbrange[low:high]</code>;</li><li><code>key=&quot;...&quot;</code> =&gt; <code>&quot;set key ...&quot;</code>;</li><li><code>title=&quot;...&quot;</code> =&gt; <code>&quot;set title \&quot;...\&quot;&quot;</code>;</li><li><code>xlabel=&quot;...&quot;</code> =&gt; <code>&quot;set xlabel \&quot;...\&quot;&quot;</code>;</li><li><code>ylabel=&quot;...&quot;</code> =&gt; <code>&quot;set ylabel \&quot;...\&quot;&quot;</code>;</li><li><code>zlabel=&quot;...&quot;</code> =&gt; <code>&quot;set zlabel \&quot;...\&quot;&quot;</code>;</li><li><code>cblabel=&quot;...&quot;</code> =&gt; <code>&quot;set cblabel \&quot;...\&quot;&quot;</code>;</li><li><code>xlog=true</code> =&gt; <code>set logscale x</code>;</li><li><code>ylog=true</code> =&gt; <code>set logscale y</code>;</li><li><code>zlog=true</code> =&gt; <code>set logscale z</code>;</li><li><code>margins=...</code> =&gt; <code>set margins ...</code>;</li><li><code>lmargin=...</code> =&gt; <code>set lmargin ...</code>;</li><li><code>rmargin=...</code> =&gt; <code>set rmargin ...</code>;</li><li><code>bmargin=...</code> =&gt; <code>set bmargin ...</code>;</li><li><code>tmargin=...</code> =&gt; <code>set tmargin ...</code>;</li></ul><p>All such keywords can be abbreviated to unambiguous names.</p><p>By using the above keywords the first lines of the previous example:</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;</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 :- &quot;set title &#39;Plot title&#39;&quot; &quot;set label &#39;X label&#39;&quot; &quot;set xrange [0:*]&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]</code></pre><p>where <code>NaN</code> in the <code>xrange</code> keyword means using axis autoscaling.</p><h2 id="Plot-matrix-as-images-1"><a class="docs-heading-anchor" href="#Plot-matrix-as-images-1">Plot matrix as images</a><a class="docs-heading-anchor-permalink" href="#Plot-matrix-as-images-1" title="Permalink"></a></h2><p><strong>Gnuplot.jl</strong> can display a 2D matrix as an image:</p><pre><code class="language-julia">img = randn(Float64, 10, 5) @gp :- tit=&quot;Plot title&quot; xlab=&quot;X label&quot; xr=[0,NaN]</code></pre><p>where <code>NaN</code> in the <code>xrange</code> keyword means using axis autoscaling.</p><h2 id="Plot-matrix-as-images-1"><a class="docs-heading-anchor" href="#Plot-matrix-as-images-1">Plot matrix as images</a><a class="docs-heading-anchor-permalink" href="#Plot-matrix-as-images-1" title="Permalink"></a></h2><p><strong>Gnuplot.jl</strong> can display a 2D matrix as an image:</p><pre><code class="language-julia">img = randn(Float64, 8, 5)
img[10,:] .= -5 img[2,:] .= -5
@gp img &quot;w image notit&quot;</code></pre><p><img src="../assets/basic007a.png" alt/></p><p>Note that the first index in the <code>img</code> matrix corresponds to the rows in the displayed image coordinate when the image is displayed.</p><p>A simple way to remember the convention is to compare how a matrix is displayed in the REPL:</p><pre><code class="language-julia">img = reshape(1:15, 5, 3)</code></pre><pre><code class="language-none">5×3 reshape(::UnitRange{Int64}, 5, 3) with eltype Int64: @gp img &quot;w image notit&quot;</code></pre><p><img src="../assets/basic007a.png" alt/></p><p>Note that the first index in the <code>img</code> matrix corresponds to the rows in the displayed image.</p><p>A simple way to remember the convention is to compare how a matrix is displayed in the REPL:</p><pre><code class="language-julia">img = reshape(1:15, 5, 3)</code></pre><pre><code class="language-none">5×3 reshape(::UnitRange{Int64}, 5, 3) with eltype Int64:
1 6 11 1 6 11
2 7 12 2 7 12
3 8 13 3 8 13
4 9 14 4 9 14
5 10 15</code></pre><p>and its image representation, which is essentially upside down:</p><pre><code class="language-julia">@gp img &quot;w image notit&quot;</code></pre><p><img src="../assets/basic007b.png" alt/></p><p>Also note that the <code>img[1,1]</code> pixel is shown at coordinates x=0, y=0. See <a href="../recipes/#Image-recipes-1">Image recipes</a> for further info.</p><h2 id="plots3d-1"><a class="docs-heading-anchor" href="#plots3d-1">3D plots</a><a class="docs-heading-anchor-permalink" href="#plots3d-1" title="Permalink"></a></h2><p>3D plots follow the same rules as 2D ones, just replace the <code>@gp</code> macro with <code>@gsp</code> and add the required columns (according to the plotting style).</p><p>E.g., to plot a spiral increasing in size along the <code>X</code> direction:</p><pre><code class="language-julia">x = 0:0.1:10pi 5 10 15</code></pre><p>and its image representation, which is essentially upside down (since the Y coordinates increase upwards):</p><pre><code class="language-julia">@gp img &quot;w image notit&quot;</code></pre><p><img src="../assets/basic007b.png" alt/></p><p>Also note that the <code>img[1,1]</code> pixel is shown at coordinates x=0, y=0. See <a href="../recipes/#Image-recipes-1">Image recipes</a> for further info.</p><h2 id="plots3d-1"><a class="docs-heading-anchor" href="#plots3d-1">3D plots</a><a class="docs-heading-anchor-permalink" href="#plots3d-1" title="Permalink"></a></h2><p>3D plots follow the same rules as 2D ones, just replace the <code>@gp</code> macro with <code>@gsp</code> and add the required columns (according to the plotting style).</p><p>E.g., to plot a spiral increasing in size along the <code>X</code> direction:</p><pre><code class="language-julia">x = 0:0.1:10pi
@gsp cbr=[-1,1].*30 x sin.(x) .* x cos.(x) .* x x./20 &quot;w p pt 7 ps var lc pal&quot;</code></pre><p><img src="../assets/basic008.png" alt/></p><p>Note that the fourth array in the dataset, <code>x./20</code>, is used as by gnuplot as point size (<code>ps var</code>). Also note that all the keywords discussed above can also be used in 3D plots.</p><h2 id="Palettes-and-line-types-1"><a class="docs-heading-anchor" href="#Palettes-and-line-types-1">Palettes and line types</a><a class="docs-heading-anchor-permalink" href="#Palettes-and-line-types-1" title="Permalink"></a></h2><p>The <strong>Gnuplot.jl</strong> package comes with all the <a href="https://juliagraphics.github.io/ColorSchemes.jl/stable/basics/#Pre-defined-schemes-1">ColorSchemes</a> palettes readily available.</p><p>A gnuplot-compliant palette can be retrieved with <a href="../api/#Gnuplot.palette"><code>palette()</code></a>, and used as any other command. The previous example may use an alternative palette with:</p><pre><code class="language-julia">x = 0:0.1:10pi @gsp cbr=[-1,1].*30 x x.*sin.(x) x.*cos.(x) x./20 &quot;w p pt 7 ps var lc pal&quot;</code></pre><p><img src="../assets/basic008.png" alt/></p><p>Note that the fourth array in the dataset, <code>x./20</code>, is used as by gnuplot as point size (<code>ps var</code>). Also note that all the keywords discussed above can also be used in 3D plots.</p><h2 id="Palettes-and-line-types-1"><a class="docs-heading-anchor" href="#Palettes-and-line-types-1">Palettes and line types</a><a class="docs-heading-anchor-permalink" href="#Palettes-and-line-types-1" title="Permalink"></a></h2><p>The <strong>Gnuplot.jl</strong> package comes with all the <a href="https://juliagraphics.github.io/ColorSchemes.jl/stable/basics/#Pre-defined-schemes-1">ColorSchemes</a> palettes readily available.</p><p>A gnuplot-compliant palette can be retrieved with <a href="../api/#Gnuplot.palette"><code>palette()</code></a>, and used as any other command. The previous example may use an alternative palette with:</p><pre><code class="language-julia">x = 0:0.1:10pi
@gsp palette(:viridis) cbr=[-1,1].*30 :- @gsp palette(:viridis) cbr=[-1,1].*30 :-
@gsp :- x sin.(x) .* x cos.(x) .* x x./20 &quot;w p pt 7 ps var lc pal&quot;</code></pre><p><img src="../assets/basic008a.png" alt/></p><p>The list of all available palette can be retrieved with <a href="../api/#Gnuplot.palette_names"><code>palette_names()</code></a>:</p><pre><code class="language-julia-repl">julia&gt; palette_names() @gsp :- x x.*sin.(x) x.*cos.(x) x./20 &quot;w p pt 7 ps var lc pal&quot;</code></pre><p><img src="../assets/basic008a.png" alt/></p><p>The list of all available palette can be retrieved with <a href="../api/#Gnuplot.palette_names"><code>palette_names()</code></a>:</p><pre><code class="language-julia-repl">julia&gt; palette_names()
478-element Array{Symbol,1}: 478-element Array{Symbol,1}:
:BuPu_6 :BuPu_6
:Spectral_4 :Spectral_4
@ -93,4 +93,4 @@ set autoscale fix
plot \ plot \
&#39;./script2_data/jl_OQrt9A&#39; binary array=(300, 100) flipy with image notit &#39;./script2_data/jl_OQrt9A&#39; binary array=(300, 100) flipy with image notit
set output</code></pre><p>The above scripts can be loaded into a pure gnuplot session (Julia is no longer needed) as follows:</p><pre><code class="language-none">gunplot&gt; load &#39;script1.gp&#39; set output</code></pre><p>The above scripts can be loaded into a pure gnuplot session (Julia is no longer needed) as follows:</p><pre><code class="language-none">gunplot&gt; load &#39;script1.gp&#39;
gunplot&gt; load &#39;script2.gp&#39;</code></pre><p>to generate a plot identical to the original one.</p><p>The purpose of gnuplot scripts is to allow sharing all data, alongside a plot, in order to foster collaboration among scientists and replicability of results. Moreover, a script can be used at any time to change the details of a plot, without the need to re-run the Julia code used to generate it the first time.</p><p>Finally, the scripts are the only possible output when <a href="../advanced/#Dry-sessions-1">Dry sessions</a> are used (i.e. when gnuplot is not available in the user platform.</p><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-1"><a class="tag is-link" href="#citeref-1">1</a>a previous knowledge of <a href="http://gnuplot.sourceforge.net/documentation.html">gnuplot</a> usage is, nevertheless, required.</li></ul></section></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../install/">« Installation</a><a class="docs-footer-nextpage" href="../advanced/">Advanced usage »</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="Friday 17 April 2020 20:08">Friday 17 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> gunplot&gt; load &#39;script2.gp&#39;</code></pre><p>to generate a plot identical to the original one.</p><p>The purpose of gnuplot scripts is to allow sharing all data, alongside a plot, in order to foster collaboration among scientists and replicability of results. Moreover, a script can be used at any time to change the details of a plot, without the need to re-run the Julia code used to generate it the first time.</p><p>Finally, the scripts are the only possible output when <a href="../advanced/#Dry-sessions-1">Dry sessions</a> are used (i.e. when gnuplot is not available in the user platform.</p><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-1"><a class="tag is-link" href="#citeref-1">1</a>a previous knowledge of <a href="http://gnuplot.sourceforge.net/documentation.html">gnuplot</a> usage is, nevertheless, required.</li></ul></section></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../install/">« Installation</a><a class="docs-footer-nextpage" href="../advanced/">Advanced usage »</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="Saturday 18 April 2020 15:11">Saturday 18 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

File diff suppressed because one or more lines are too long

View File

@ -4,4 +4,4 @@ Status `~/.julia/environments/v1.4/Project.toml`
[dc211083] Gnuplot v1.2.0</code></pre><p>If the displayed version is not <code>v1.2.0</code> you are probably having a dependency conflict. In this case try forcing installation of the latest version with:</p><pre><code class="language-julia-repl">julia&gt; ]add Gnuplot@1.2.0</code></pre><p>and check which package is causing the conflict.</p><p>Check execution and version of the underlying <code>gnuplot</code> process:</p><pre><code class="language-julia-repl">julia&gt; using Gnuplot [dc211083] Gnuplot v1.2.0</code></pre><p>If the displayed version is not <code>v1.2.0</code> you are probably having a dependency conflict. In this case try forcing installation of the latest version with:</p><pre><code class="language-julia-repl">julia&gt; ]add Gnuplot@1.2.0</code></pre><p>and check which package is causing the conflict.</p><p>Check execution and version of the underlying <code>gnuplot</code> process:</p><pre><code class="language-julia-repl">julia&gt; using Gnuplot
julia&gt; Gnuplot.gpversion() julia&gt; Gnuplot.gpversion()
v&quot;5.2.0&quot;</code></pre><p>The minimum required version is <code>v5.0</code>.</p><p>Generate the first plot:</p><pre><code class="language-julia-repl">julia&gt; @gp 1:9</code></pre><p>Test default terminal capabilities:</p><pre><code class="language-julia-repl">test_terminal()</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../basic/">Basic usage »</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="Friday 17 April 2020 20:08">Friday 17 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> v&quot;5.2.0&quot;</code></pre><p>The minimum required version is <code>v5.0</code>.</p><p>Generate the first plot:</p><pre><code class="language-julia-repl">julia&gt; @gp 1:9</code></pre><p>Test default terminal capabilities:</p><pre><code class="language-julia-repl">test_terminal()</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../basic/">Basic usage »</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="Saturday 18 April 2020 15:11">Saturday 18 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

View File

@ -63,4 +63,4 @@ julia&gt; Gnuplot.options.term_svg = &quot;svg dynamic&quot;;</code></pre><h2 id
# Comment the following to disable the REPL. # Comment the following to disable the REPL.
Gnuplot.repl_init(start_key=&#39;&gt;&#39;); Gnuplot.repl_init(start_key=&#39;&gt;&#39;);
) )
end</code></pre><p>At the Julia prompt you may load the package and the associated settings by typing:</p><pre><code class="language-julia">julia&gt; @gnuplotrc</code></pre><p>and you&#39;re ready to go.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../advanced/">« Advanced 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="Friday 17 April 2020 20:08">Friday 17 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> end</code></pre><p>At the Julia prompt you may load the package and the associated settings by typing:</p><pre><code class="language-julia">julia&gt; @gnuplotrc</code></pre><p>and you&#39;re ready to go.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../advanced/">« Advanced 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="Saturday 18 April 2020 15:11">Saturday 18 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

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="../options/">Package options</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="../recipes/">Plot recipes</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="Friday 17 April 2020 20:08">Friday 17 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> <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="../options/">Package options</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="../recipes/">Plot recipes</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="Saturday 18 April 2020 15:11">Saturday 18 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

@ -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="../options/">« Package options</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="Friday 17 April 2020 20:08">Friday 17 April 2020</span>. Using Julia version 1.4.0.</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="../options/">« Package options</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="Saturday 18 April 2020 15:11">Saturday 18 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

View File

@ -22,4 +22,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="../recipes/">Plot recipes »</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="Friday 17 April 2020 20:08">Friday 17 April 2020</span>. Using Julia version 1.4.0.</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="../recipes/">Plot recipes »</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="Saturday 18 April 2020 15:11">Saturday 18 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>