Gnuplot.jl/v1.2.0/api/index.html
2020-04-16 22:59:56 +02:00

44 lines
43 KiB
HTML

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>API · 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><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 class="is-active"><a class="tocitem" href>API</a><ul class="internal"><li><a class="tocitem" href="#Index-1"><span>Index</span></a></li><li><a class="tocitem" href="#Exported-symbols-1"><span>Exported symbols</span></a></li><li><a class="tocitem" href="#Non-exported-symbols-1"><span>Non-exported symbols</span></a></li></ul></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>API</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>API</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/gcalderone/Gnuplot.jl/blob/master/docs/src/api.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="API-1"><a class="docs-heading-anchor" href="#API-1">API</a><a class="docs-heading-anchor-permalink" href="#API-1" title="Permalink"></a></h1><h2 id="Index-1"><a class="docs-heading-anchor" href="#Index-1">Index</a><a class="docs-heading-anchor-permalink" href="#Index-1" title="Permalink"></a></h2><ul><li><a href="#Gnuplot.Dataset"><code>Gnuplot.Dataset</code></a></li><li><a href="#Gnuplot.DatasetBin"><code>Gnuplot.DatasetBin</code></a></li><li><a href="#Gnuplot.DatasetEmpty"><code>Gnuplot.DatasetEmpty</code></a></li><li><a href="#Gnuplot.DatasetText"><code>Gnuplot.DatasetText</code></a></li><li><a href="#Gnuplot.Histogram1D"><code>Gnuplot.Histogram1D</code></a></li><li><a href="#Gnuplot.Histogram2D"><code>Gnuplot.Histogram2D</code></a></li><li><a href="#Gnuplot.IsoContourLines"><code>Gnuplot.IsoContourLines</code></a></li><li><a href="#Gnuplot.Options"><code>Gnuplot.Options</code></a></li><li><a href="#Gnuplot.Path2d"><code>Gnuplot.Path2d</code></a></li><li><a href="#Gnuplot.PlotElement"><code>Gnuplot.PlotElement</code></a></li><li><a href="#Gnuplot.boxxyerror"><code>Gnuplot.boxxyerror</code></a></li><li><a href="#Gnuplot.contourlines"><code>Gnuplot.contourlines</code></a></li><li><a href="#Gnuplot.dataset_names"><code>Gnuplot.dataset_names</code></a></li><li><a href="#Gnuplot.gpexec"><code>Gnuplot.gpexec</code></a></li><li><a href="#Gnuplot.gpmargins"><code>Gnuplot.gpmargins</code></a></li><li><a href="#Gnuplot.gpranges"><code>Gnuplot.gpranges</code></a></li><li><a href="#Gnuplot.gpvars"><code>Gnuplot.gpvars</code></a></li><li><a href="#Gnuplot.gpversion"><code>Gnuplot.gpversion</code></a></li><li><a href="#Gnuplot.hist"><code>Gnuplot.hist</code></a></li><li><a href="#Gnuplot.linetypes"><code>Gnuplot.linetypes</code></a></li><li><a href="#Gnuplot.palette"><code>Gnuplot.palette</code></a></li><li><a href="#Gnuplot.palette_names"><code>Gnuplot.palette_names</code></a></li><li><a href="#Gnuplot.quit"><code>Gnuplot.quit</code></a></li><li><a href="#Gnuplot.quitall"><code>Gnuplot.quitall</code></a></li><li><a href="#Gnuplot.recipe"><code>Gnuplot.recipe</code></a></li><li><a href="#Gnuplot.repl_init"><code>Gnuplot.repl_init</code></a></li><li><a href="#Gnuplot.save"><code>Gnuplot.save</code></a></li><li><a href="#Gnuplot.session_names"><code>Gnuplot.session_names</code></a></li><li><a href="#Gnuplot.stats"><code>Gnuplot.stats</code></a></li><li><a href="#Gnuplot.terminal"><code>Gnuplot.terminal</code></a></li><li><a href="#Gnuplot.terminals"><code>Gnuplot.terminals</code></a></li><li><a href="#Gnuplot.test_terminal"><code>Gnuplot.test_terminal</code></a></li><li><a href="#Gnuplot.version"><code>Gnuplot.version</code></a></li><li><a href="#Gnuplot.@gp"><code>Gnuplot.@gp</code></a></li><li><a href="#Gnuplot.@gsp"><code>Gnuplot.@gsp</code></a></li></ul><h2 id="Exported-symbols-1"><a class="docs-heading-anchor" href="#Exported-symbols-1">Exported symbols</a><a class="docs-heading-anchor-permalink" href="#Exported-symbols-1" title="Permalink"></a></h2><p>The list of <strong>Gnuplot.jl</strong> exported symbols is as follows:</p><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.@gp" href="#Gnuplot.@gp"><code>Gnuplot.@gp</code></a><span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia">@gp args...</code></pre><p>The <code>@gp</code> macro, and its companion <code>@gsp</code> for 3D plots, allows to send data and commands to the gnuplot using an extremely concise syntax. The macros accepts any number of arguments, with the following meaning:</p><ul><li><p>one, or a group of consecutive, array(s) of either <code>Real</code> or <code>String</code> build up a dataset. The different arrays are accessible as columns 1, 2, etc. from the <code>gnuplot</code> process. The number of required input arrays depends on the chosen plot style (see <code>gnuplot</code> documentation);</p></li><li><p>a string occurring before a dataset is interpreted as a <code>gnuplot</code> command (e.g. <code>set grid</code>);</p></li><li><p>a string occurring immediately after a dataset is interpreted as a <em>plot element</em> for the dataset, by which you can specify <code>using</code> clause, <code>with</code> clause, line styles, etc.. All keywords may be abbreviated following gnuplot conventions. Moreover, &quot;plot&quot; and &quot;splot&quot; can be abbreviated to &quot;p&quot; and &quot;s&quot; respectively;</p></li><li><p>the special symbol <code>:-</code> allows to split one long statement into multiple (shorter) ones. If given as first argument it avoids starting a new plot. If it given as last argument it avoids immediately running all commands to create the final plot;</p></li><li><p>any other symbol is interpreted as a session ID;</p></li><li><p>an <code>Int</code> (&gt;= 1) is interpreted as the plot destination in a multi-plot session (this specification applies to subsequent arguments, not previous ones);</p></li><li><p>an input in the form <code>&quot;\$name&quot;=&gt;(array1, array2, etc...)</code> is interpreted as a named dataset. Note that the dataset name must always start with a &quot;<code>$</code>&quot;;</p></li><li><p>an input in the form <code>keyword=value</code> is interpreted as a keyword/value pair. The accepted keywords and their corresponding gnuplot commands are as follows:</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>cblog=true</code> =&gt; <code>set logscale cb</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></li></ul><p>All Keyword names can be abbreviated as long as the resulting name is unambiguous. E.g. you can use <code>xr=[1,10]</code> in place of <code>xrange=[1,10]</code>.</p><ul><li><p>a <code>PlotElement</code> object is expanded in its fields and processed as one of the previous arguments;</p></li><li><p>any other data type is processed through an implicit recipe. If a suitable recipe do not exists an error is raised.</p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1369-L1414">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.@gsp" href="#Gnuplot.@gsp"><code>Gnuplot.@gsp</code></a><span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia">@gsp args...</code></pre><p>This macro accepts the same syntax as <a href="#Gnuplot.@gp"><code>@gp</code></a>, but produces a 3D plot instead of a 2D one.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1432-L1436">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.boxxyerror" href="#Gnuplot.boxxyerror"><code>Gnuplot.boxxyerror</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">boxxyerror(x, y; xmin=NaN, ymin=NaN, xmax=NaN, ymax=NaN, cartesian=false)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1796-L1798">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.contourlines" href="#Gnuplot.contourlines"><code>Gnuplot.contourlines</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">contourlines(x::Vector{Float64}, y::Vector{Float64}, h::Matrix{Float64}; cntrparam=&quot;level auto 10&quot;)</code></pre><p>Compute paths of contour lines for 2D data, and return a vector of <a href="#Gnuplot.IsoContourLines"><code>IsoContourLines</code></a> object.</p><p><strong>Arguments:</strong></p><ul><li><code>x</code>, <code>y</code>: Coordinates;</li><li><code>h</code>: the levels on which iso contour lines are to be calculated</li><li><code>cntrparam</code>: settings to compute contour line paths (see gnuplot documentation for <code>cntrparam</code>).</li></ul><p><strong>Example</strong></p><pre><code class="language-julia">x = randn(5000);
y = randn(5000);
h = hist(x, y, nbins1=20, nbins2=20);
clines = contourlines(h.bins1, h.bins2, h.counts, cntrparam=&quot;levels discrete 15, 30, 45&quot;);
@gp &quot;set size ratio -1&quot;
for i in 1:length(clines)
@gp :- clines[i].data &quot;w l t &#39;$(clines[i].z)&#39; dt $i&quot;
end</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1873-L1894">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.dataset_names" href="#Gnuplot.dataset_names"><code>Gnuplot.dataset_names</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">dataset_names(sid::Symbol)
dataset_names()</code></pre><p>Return a vector with all dataset names for the <code>sid</code> session. If <code>sid</code> is not provided the default session is considered.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1503-L1508">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.gpexec" href="#Gnuplot.gpexec"><code>Gnuplot.gpexec</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">gpexec(sid::Symbol, command::String)
gpexec(command::String)</code></pre><p>Execute the gnuplot command <code>command</code> on the underlying gnuplot process of the <code>sid</code> session, and return the results as a <code>Vector{String}</code>. If a gnuplot error arises it is propagated as an <code>ErrorException</code>.</p><p>If the <code>sid</code> argument is not provided, the default session is considered.</p><p><strong>Examples:</strong></p><pre><code class="language-julia-repl">gpexec(&quot;print GPVAL_TERM&quot;)
gpexec(&quot;plot sin(x)&quot;)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1350-L1363">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.gpmargins" href="#Gnuplot.gpmargins"><code>Gnuplot.gpmargins</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">gpmargins(sid::Symbol)
gpmargins()</code></pre><p>Return a <code>NamedTuple</code> with keys <code>l</code>, <code>r</code>, <code>b</code> and <code>t</code> containing respectively the left, rigth, bottom and top margins of the current plot (in screen coordinates).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L2020-L2025">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.gpranges" href="#Gnuplot.gpranges"><code>Gnuplot.gpranges</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">gpranges(sid::Symbol)
gpranges()</code></pre><p>Return a <code>NamedTuple</code> with keys <code>x</code>, <code>y</code>, <code>z</code> and <code>cb</code> containing respectively the current plot ranges for the X, Y, Z and color box axis.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L2036-L2041">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.gpvars" href="#Gnuplot.gpvars"><code>Gnuplot.gpvars</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">gpvars(sid::Symbol)
gpvars()</code></pre><p>Return a <code>NamedTuple</code> with all currently defined gnuplot variables. If the <code>sid</code> argument is not provided, the default session is considered.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1983-L1988">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.hist" href="#Gnuplot.hist"><code>Gnuplot.hist</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">hist(v::Vector{T}; range=extrema(v), bs=NaN, nbins=0, pad=true) where T &lt;: Real</code></pre><p>Calculates the histogram of the values in <code>v</code> and returns a <a href="#Gnuplot.Histogram1D"><code>Histogram1D</code></a> structure.</p><p><strong>Arguments</strong></p><ul><li><code>v</code>: a vector of values to compute the histogra;</li><li><code>range</code>: values of the left edge of the first bin and of the right edge of the last bin;</li><li><code>bs</code>: size of histogram bins;</li><li><code>nbins</code>: number of bins in the histogram;</li><li><code>pad</code>: if true add one dummy bins with zero counts before the first bin and after the last.</li></ul><p>If <code>bs</code> is given <code>nbins</code> is ignored.</p><p><strong>Example</strong></p><pre><code class="language-julia">v = randn(1000)
h = hist(v, bs=0.5)
@gp h # preview
@gp h.bins h.counts &quot;w histep notit&quot;</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1684-L1705">source</a></section><section><div><pre><code class="language-none">hist(v1::Vector{T1 &lt;: Real}, v2::Vector{T2 &lt;: Real}; range1=[NaN,NaN], bs1=NaN, nbins1=0, range2=[NaN,NaN], bs2=NaN, nbins2=0)</code></pre><p>Calculates the 2D histogram of the values in <code>v1</code> and <code>v2</code> and returns a <a href="#Gnuplot.Histogram2D"><code>Histogram2D</code></a> structure.</p><p><strong>Arguments</strong></p><ul><li><code>v1</code>: a vector of values along the first dimension;</li><li><code>v2</code>: a vector of values along the second dimension;</li><li><code>range1</code>: values of the left edge of the first bin and of the right edge of the last bin, along the first dimension;</li><li><code>range1</code>: values of the left edge of the first bin and of the right edge of the last bin, along the second dimension;</li><li><code>bs1</code>: size of histogram bins along the first dimension;</li><li><code>bs2</code>: size of histogram bins along the second dimension;</li><li><code>nbins1</code>: number of bins along the first dimension;</li><li><code>nbins2</code>: number of bins along the second dimension;</li></ul><p>If <code>bs1</code> (<code>bs2</code>) is given <code>nbins1</code> (<code>nbins2</code>) is ignored.</p><p><strong>Example</strong></p><pre><code class="language-julia">v1 = randn(1000)
v2 = randn(1000)
h = hist(v1, v2, bs1=0.5, bs2=0.5)
@gp h # preview
@gp &quot;set size ratio -1&quot; &quot;set auto fix&quot; h.bins1 h.bins2 h.counts &quot;w image notit&quot;</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1739-L1764">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.linetypes" href="#Gnuplot.linetypes"><code>Gnuplot.linetypes</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">linetypes(cmap::ColorScheme; lw=1, ps=1, dashed=false, rev=false)
linetypes(s::Symbol; lw=1, ps=1, dashed=false, rev=false)</code></pre><p>Convert a <code>ColorScheme</code> object into a string containing the gnuplot commands to set up <em>linetype</em> colors.</p><p>If the argument is a <code>Symbol</code> it is interpreted as the name of one of the predefined schemes in <a href="https://juliagraphics.github.io/ColorSchemes.jl/stable/basics/#Pre-defined-schemes-1">ColorSchemes</a>.</p><p>If <code>rev=true</code> the line colors are reversed. If a numeric or string value is provided through the <code>lw</code> and <code>ps</code> keywords thay are used to set the line width and the point size respectively. If <code>dashed</code> is true the linetypes with index greater than 1 will be displayed with dashed pattern.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1548-L1557">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.palette" href="#Gnuplot.palette"><code>Gnuplot.palette</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">palette(cmap::ColorScheme; rev=false)
palette(s::Symbol; rev=false)</code></pre><p>Convert a <code>ColorScheme</code> object into a string containing the gnuplot commands to set up the corresponding palette.</p><p>If the argument is a <code>Symbol</code> it is interpreted as the name of one of the predefined schemes in <a href="https://juliagraphics.github.io/ColorSchemes.jl/stable/basics/#Pre-defined-schemes-1">ColorSchemes</a>. If <code>rev=true</code> the palette is reversed.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1575-L1582">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.palette_names" href="#Gnuplot.palette_names"><code>Gnuplot.palette_names</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">palette_names()</code></pre><p>Return a vector with all available color schemes for the <a href="#Gnuplot.palette"><code>palette</code></a> and <a href="#Gnuplot.linetypes"><code>linetypes</code></a> function.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1540-L1544">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.recipe" href="#Gnuplot.recipe"><code>Gnuplot.recipe</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">recipe(h::Histogram1D)
recipe(h::Histogram2D)</code></pre><p>Implicit recipes to visualize 1D and 2D histograms.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/recipes.jl#L7-L12">source</a></section><section><div><pre><code class="language-none">recipe(M::Matrix{ColorTypes.RGB{T}}, opt=&quot;flipy&quot;)
recipe(M::Matrix{ColorTypes.RGBA{T}}, opt=&quot;flipy&quot;)
recipe(M::Matrix{ColorTypes.Gray{T}}, opt=&quot;flipy&quot;)
recipe(M::Matrix{ColorTypes.GrayA{T}}, opt=&quot;flipy&quot;)</code></pre><p>Implicit recipes to show images.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/recipes.jl#L26-L33">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.save" href="#Gnuplot.save"><code>Gnuplot.save</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">save(sid::Symbol; term=&quot;&quot;, output=&quot;&quot;)
save(sid::Symbol, script_filename::String, ;term=&quot;&quot;, output=&quot;&quot;)
save(; term=&quot;&quot;, output=&quot;&quot;)
save(script_filename::String ;term=&quot;&quot;, output=&quot;&quot;)</code></pre><p>Export a (multi-)plot into the external file name provided in the <code>output=</code> keyword. The gnuplot terminal to use is provided through the <code>term=</code> keyword.</p><p>If the <code>script_filename</code> argument is provided a <em>gnuplot script</em> will be written in place of the output image. The latter can then be used in a pure gnuplot session (Julia is no longer needed) to generate exactly the same original plot.</p><p>If the <code>sid</code> argument is provided the operation applies to the corresponding session.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1446-L1457">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.session_names" href="#Gnuplot.session_names"><code>Gnuplot.session_names</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">session_names()</code></pre><p>Return a vector with all currently active sessions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1513-L1517">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.stats" href="#Gnuplot.stats"><code>Gnuplot.stats</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">stats(sid::Symbol,name::String)
stats(name::String)
stats(sid::Symbol)
stats()</code></pre><p>Print a statistical summary for the <code>name</code> dataset, belonging to <code>sid</code> session. If <code>name</code> is not provdied a summary is printed for each dataset in the session. If <code>sid</code> is not provided the default session is considered.</p><p>This function is actually a wrapper for the gnuplot command <code>stats</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1521-L1530">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.terminals" href="#Gnuplot.terminals"><code>Gnuplot.terminals</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">terminals()</code></pre><p>Return a <code>Vector{String}</code> with the names of all the available gnuplot terminals.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1599-L1603">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.terminal" href="#Gnuplot.terminal"><code>Gnuplot.terminal</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">terminal(sid::Symbol)
terminal()</code></pre><p>Return a <code>String</code> with the current gnuplot terminal (and its options) of the process associated to session <code>sid</code>, or to the default session (if <code>sid</code> is not provided).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1608-L1613">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.test_terminal" href="#Gnuplot.test_terminal"><code>Gnuplot.test_terminal</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">test_terminal(term=nothing; linetypes=nothing, palette=nothing)</code></pre><p>Run the <code>test</code> and <code>test palette</code> commands on a gnuplot terminal.</p><p>If no <code>term</code> is given it will use the default terminal. If <code>lt</code> and <code>pal</code> are given they are used as input to the <a href="#Gnuplot.linetypes"><code>linetypes</code></a> and <a href="#Gnuplot.palette"><code>palette</code></a> function repsetcively to load the associated color scheme.</p><p><strong>Examples</strong></p><pre><code class="language-julia">test_terminal()
test_terminal(&quot;wxt&quot;, lt=:rust, pal=:viridis)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1618-L1630">source</a></section></article><h2 id="Non-exported-symbols-1"><a class="docs-heading-anchor" href="#Non-exported-symbols-1">Non-exported symbols</a><a class="docs-heading-anchor-permalink" href="#Non-exported-symbols-1" title="Permalink"></a></h2><p>The following functions are not exported by the <strong>Gnuplot.jl</strong> package since they are typically not used in every day work, or aimed to debugging purposes. Still, they can be useful in some case, hence they are documented here.</p><p>In order to call these functions you should add the <code>Gnuplot.</code> prefix to the function name.</p><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.Dataset" href="#Gnuplot.Dataset"><code>Gnuplot.Dataset</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Dataset</code></pre><p>Abstract type for all dataset structures.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L20-L24">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.DatasetEmpty" href="#Gnuplot.DatasetEmpty"><code>Gnuplot.DatasetEmpty</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">DatasetEmpty</code></pre><p>An empty dataset.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L27-L31">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.DatasetText" href="#Gnuplot.DatasetText"><code>Gnuplot.DatasetText</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">DatasetText</code></pre><p>A dataset whose data are stored as a text buffer.</p><p>Transmission to gnuplot may be slow for large datasets, but no temporary file is involved, and the dataset can be saved directly into a gnuplot script. Also, the constructor allows to build more flexible datasets (i.e. mixing arrays with different dimensions).</p><p>Constructors are defined as follows:</p><pre><code class="language-julia">DatasetText(data::Vector{String})
DatasetText(data::Vararg{AbstractArray, N}) where N =</code></pre><p>In the second form the type of elements of each array must be one of <code>Real</code>, <code>AbstractString</code> and <code>Missing</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L35-L48">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.DatasetBin" href="#Gnuplot.DatasetBin"><code>Gnuplot.DatasetBin</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">DatasetBin</code></pre><p>A dataset whose data are stored as a binary file.</p><p>Ensure best performances for large datasets, but involve use of a temporary files. When saving a script the file is stored in a directory with the same name as the main script file.</p><p>Constructors are defined as follows:</p><pre><code class="language-julia">DatasetBin(cols::Vararg{AbstractMatrix, N}) where N
DatasetBin(cols::Vararg{AbstractVector, N}) where N</code></pre><p>In both cases the element of the arrays must be a numeric type.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L55-L68">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.Histogram1D" href="#Gnuplot.Histogram1D"><code>Gnuplot.Histogram1D</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Histogram1D</code></pre><p>A 1D histogram data.</p><p><strong>Fields</strong></p><ul><li><code>bins::Vector{Float64}</code>: bin center values;</li><li><code>counts::Vector{Float64}</code>: counts in the bins;</li><li><code>binsize::Float64</code>: size of each bin;</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1646-L1655">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.Histogram2D" href="#Gnuplot.Histogram2D"><code>Gnuplot.Histogram2D</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Histogram2D</code></pre><p>A 2D histogram data.</p><p><strong>Fields</strong></p><ul><li><code>bins1::Vector{Float64}</code>: bin center values along first dimension;</li><li><code>bins2::Vector{Float64}</code>: bin center values along second dimension;</li><li><code>counts::Vector{Float64}</code>: counts in the bins;</li><li><code>binsize1::Float64</code>: size of each bin along first dimension;</li><li><code>binsize2::Float64</code>: size of each bin along second dimension;</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1662-L1673">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.IsoContourLines" href="#Gnuplot.IsoContourLines"><code>Gnuplot.IsoContourLines</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">IsoContourLines</code></pre><p>Coordinates of all contour lines of a given level.</p><p><strong>Fields</strong></p><ul><li><code>paths::Vector{Path2d}</code>: vector of <a href="#Gnuplot.Path2d"><code>Path2d</code></a> objects, one for each continuous path;</li><li><code>data::Vector{String}</code>: vector with string representation of all paths (ready to be sent to gnuplot);</li><li><code>z::Float64</code>: level of the contour lines.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1846-L1855">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.Options" href="#Gnuplot.Options"><code>Gnuplot.Options</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Options</code></pre><p>Structure containing the package global options, accessible through <code>Gnuplot.options</code>.</p><p><strong>Fields</strong></p><ul><li><code>dry::Bool</code>: whether to use <em>dry</em> sessions, i.e. without an underlying Gnuplot process (default: <code>false</code>)</li><li><code>cmd::String</code>: command to start the Gnuplot process (default: <code>&quot;gnuplot&quot;</code>)</li><li><code>default::Symbol</code>: default session name (default: <code>:default</code>)</li><li><code>init::Vector{String}</code>: commands to initialize the session when it is created (e.g., to set default terminal);</li><li><code>reset::Vector{String}</code>: commands to initialize the session when it is reset (e.g., to set default palette);</li><li><code>verbose::Bool</code>: verbosity flag (default: <code>false</code>)</li><li><code>preferred_format::Symbol</code>: preferred format to send data to gnuplot. Value must be one of:<ul><li><code>bin</code>: fastest solution 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></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaLang/julia/blob/b8e9a9ecc62ab49003bd4f1834771bdeb8cb1aa2/base/#L0-L16">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.Path2d" href="#Gnuplot.Path2d"><code>Gnuplot.Path2d</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Path2d</code></pre><p>A path in 2D.</p><p><strong>Fields</strong></p><ul><li><code>x::Vector{Float64}</code></li><li><code>y::Vector{Float64}</code></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1830-L1838">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.PlotElement" href="#Gnuplot.PlotElement"><code>Gnuplot.PlotElement</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">PlotElement</code></pre><p>Structure containing element(s) of a plot (commands, data, plot specifications) that can be used directly in <code>@gp</code> and <code>@gsp</code> calls.</p><p><strong>Fields</strong></p><ul><li><code>mid::Int</code>: multiplot ID (use 0 for single plots);</li><li><code>is3d::Bool</code>: true if the data are supposed to be displayed in a 3D plot;</li><li><code>cmds::Vector{String}</code>: commands to set plot properties;</li><li><code>name::String</code>: name of the dataset (use &quot;&quot; to automatically generate a unique name);</li><li><code>data::Dataset</code>: a dataset</li><li><code>plot::Vector{String}</code>: plot specifications for the associated <code>Dataset</code>;</li></ul><p>The constructor is defined as follows:</p><pre><code class="language-julia">PlotElement(;mid::Int=0, is3d::Bool=false,
cmds::Union{String, Vector{String}}=Vector{String}(),
name::String=&quot;&quot;,
data::Dataset=DatasetEmpty(),
plot::Union{String, Vector{String}}=Vector{String}(),
kwargs...)</code></pre><p>No field is mandatory, i.e. even <code>Gnuplot.PlotElement()</code> provides a valid structure. The constructor also accept all the keywords accepted by <code>parseKeywords</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L76-L100">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.gpversion" href="#Gnuplot.gpversion"><code>Gnuplot.gpversion</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">Gnuplot.gpversion()</code></pre><p>Return the gnuplot application version.</p><p>Raise an error if version is &lt; 5.0 (required to use data blocks).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1286-L1292">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.quit" href="#Gnuplot.quit"><code>Gnuplot.quit</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">Gnuplot.quit(sid::Symbol)</code></pre><p>Quit the session identified by <code>sid</code> and the associated gnuplot process (if any).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1321-L1325">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.quitall" href="#Gnuplot.quitall"><code>Gnuplot.quitall</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">Gnuplot.quitall()</code></pre><p>Quit all the sessions and the associated gnuplot processes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1331-L1335">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.repl_init" href="#Gnuplot.repl_init"><code>Gnuplot.repl_init</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">Gnuplot.init_repl(; start_key=&#39;&gt;&#39;)</code></pre><p>Install a hook to replace the common Julia REPL with a gnuplot one. The key to start the REPL is the one provided in <code>start_key</code> (default: <code>&gt;</code>).</p><p>Note: the gnuplot REPL operates only on the default session.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1948-L1954">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Gnuplot.version" href="#Gnuplot.version"><code>Gnuplot.version</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">Gnuplot.version()</code></pre><p>Return the <strong>Gnuplot.jl</strong> package version.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/gcalderone/Gnuplot.jl/blob/4a0b6201c569275442f306464e298115b35123dc/src/Gnuplot.jl#L1278-L1282">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" 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 16 April 2020 22:52">Thursday 16 April 2020</span>. Using Julia version 1.4.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>