Gnuplot.jl/dev/index.html
Giorgio Calderone c637935e0c Docs updated
2020-03-26 09:55:33 +01:00

3 lines
13 KiB
HTML

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Home · 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 class="is-active"><a class="tocitem" href>Home</a><ul class="internal"><li><a class="tocitem" href="#A-Julia-interface-to-Gnuplot.-1"><span>A Julia interface to Gnuplot.</span></a></li><li><a class="tocitem" href="#Yet-another-plotting-package?-1"><span>Yet another plotting package?</span></a></li><li><a class="tocitem" href="#Do-Gnuplot.jl-suits-my-needs?-1"><span>Do Gnuplot.jl suits my needs?</span></a></li><li><a class="tocitem" href="#Notation-1"><span>Notation</span></a></li><li><a class="tocitem" href="#Table-of-Contents-1"><span>Table of Contents</span></a></li></ul></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 techniques</a></li><li><a class="tocitem" href="tips/">Tips</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>Home</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Home</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/gcalderone/Gnuplot.jl/blob/master/docs/src/index.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="Gnuplot.jl-1"><a class="docs-heading-anchor" href="#Gnuplot.jl-1">Gnuplot.jl</a><a class="docs-heading-anchor-permalink" href="#Gnuplot.jl-1" title="Permalink"></a></h1><h2 id="A-Julia-interface-to-Gnuplot.-1"><a class="docs-heading-anchor" href="#A-Julia-interface-to-Gnuplot.-1">A Julia interface to Gnuplot.</a><a class="docs-heading-anchor-permalink" href="#A-Julia-interface-to-Gnuplot.-1" title="Permalink"></a></h2><p>The <strong>Gnuplot.jl</strong> package allows easy and fast use of <a href="http://gnuplot.info/"><code>gnuplot</code></a> as a data visualization tool in Julia. Have a look at <a href="basic/#Basic-usage-1">Basic usage</a> and <a href="examples/#Examples-1">Examples</a> for a quick overview. The package main features are:</p><ul><li><p>fast time-to-first-plot (~1 sec);</p></li><li><p>extremely concise yet meaningful syntax, makes it ideal for interactive data exploration;</p></li><li><p>no need to learn new API functions or keywords: only two macros (<code>@gp</code> for 2D plots, <code>@gsp</code> for 3D plots) and a basic knowledge of <code>gnuplot</code> are enough to generate the most complex plots;</p></li><li><p>transparent interface between Julia and <code>gnuplot</code> to exploit all functionalities of the latter, both present and future ones;</p></li><li><p>fast data transmission through system pipes (no temporary files involved);</p></li><li><p>availability of all the palettes from <a href="https://github.com/JuliaGraphics/ColorSchemes.jl">ColorSchemes</a>;</p></li><li><p>support for multiple plots in one window, multiple plotting windows, as well as ASCII and Sixel plots (to plot directly in a terminal);</p></li><li><p>support for histograms (both 1D and 2D);</p></li><li><p>enhanced support for contour plots;</p></li><li><p>export to a huge number of formats such as <code>pdf</code>, <code>png</code>, <span>$\LaTeX$</span>, <code>svg</code>, etc. (actually all those supported by <code>gnuplot</code>);</p></li><li><p>save sessions into <code>gnuplot</code> scripts enables easy plot reproducibility and modifications.</p></li></ul><h2 id="Yet-another-plotting-package?-1"><a class="docs-heading-anchor" href="#Yet-another-plotting-package?-1">Yet another plotting package?</a><a class="docs-heading-anchor-permalink" href="#Yet-another-plotting-package?-1" title="Permalink"></a></h2><p>A powerful plotting framework is among the most important tool in the toolbox of any modern scientist and engineer. As such, it is hard to find a single package to fit all needs, and many solutions are indeed available in the Julia <a href="https://github.com/JuliaPlots">ecosystem</a>.</p><p><strong>Gnuplot.jl</strong> package fills the niche of users who needs:</p><ol><li>publication-quality plots, by exploiting the capabilities of a widely used tool such as <code>gnuplot</code>, and its many output formats available;</li><li>a well-documented framework, by taking advantage of all the <code>gnuplot</code> documentation, tutorials and examples available on the web;</li><li>a fast response, by relying on an external program (rather than on a large Julia code base);</li><li>an interactive data exploration framework, by exposing a carefully designed, extremely concise and easy to remember syntax (at least for users with minimal <code>gnuplot</code> knowledge);</li><li>a procedure to foster plot reproducibility by sharing just the data and commands in the form of <code>gnuplot</code> scripts, rather than the original Julia code.</li></ol><p>Unlike other packages <strong>Gnuplot.jl</strong> is not a pure Julia solution as it depends on an external package to actually generate plots. However, if <code>gnuplot</code> is not available on a given platform, the package could still be used in &quot;<em>dry</em>&quot; mode, and no error for a missing dependency will be raised (see <a href="advanced/#Dry-sessions-1">Dry sessions</a>).</p><p>The <strong>Gnuplot.jl</strong> package development follows a minimalistic approach: it is essentially a thin layer to send data and string commands to <code>gnuplot</code>. This way all underlying capabilities, both present and future ones, are automatically exposed to Julia user, with no need to implement dedicated wrappers.</p><p>The functionalities 1, 2 and 3 listed above are similar to those provided by the <a href="https://github.com/mbaz/Gaston.jl">Gaston</a> package. <strong>Gnuplot.jl</strong> also provides features 4 and 5, as well as the minimalistic approach.</p><h2 id="Do-Gnuplot.jl-suits-my-needs?-1"><a class="docs-heading-anchor" href="#Do-Gnuplot.jl-suits-my-needs?-1">Do Gnuplot.jl suits my needs?</a><a class="docs-heading-anchor-permalink" href="#Do-Gnuplot.jl-suits-my-needs?-1" title="Permalink"></a></h2><p>Any modern plotting package is able to produce a simple scatter plot, with custom symbols, line styles, colors and axis labels. Indeed, this is exactly the example that is reported in every package documentation (also here: see <a href="basic/#plots2d-1">2D plots</a>). Still, producing complex and publication-quality plots is not an easy task. As a consequence is also not easy to determine whether a package can cope with the most difficult cases (unless you actually try it out) and a reasonable choice is typically to rely on the size of the user base, the availability of documentation / tutorials, and the possibility to preview complex examples.</p><p><strong>Gnuplot.jl</strong> aims to be ready for even the most challenging plots by relying on the widely and long lasting used <code>gnuplot</code> application, and by allowing each native feature (both present and future ones) to be immediately available in the Julia language. Moreover, <strong>Gnuplot.jl</strong> provides a unique syntax specifically aimed to increase productivity while performing interactive data exploration.</p><p>Last but not least, have a look at the <strong>Gnuplot.jl</strong> <a href="#ref">Examples</a> page.</p><h2 id="Notation-1"><a class="docs-heading-anchor" href="#Notation-1">Notation</a><a class="docs-heading-anchor-permalink" href="#Notation-1" title="Permalink"></a></h2><p>In this documentation:</p><ul><li><strong>Gnuplot.jl</strong> refers to the Julia package;</li><li><code>gnuplot</code> refers to the <a href="http://gnuplot.info/">gnuplot</a> application.</li></ul><h2 id="Table-of-Contents-1"><a class="docs-heading-anchor" href="#Table-of-Contents-1">Table of Contents</a><a class="docs-heading-anchor-permalink" href="#Table-of-Contents-1" title="Permalink"></a></h2><ul><li><a href="#Gnuplot.jl-1">Gnuplot.jl</a></li><ul><li><a href="#A-Julia-interface-to-Gnuplot.-1">A Julia interface to Gnuplot.</a></li><li><a href="#Yet-another-plotting-package?-1">Yet another plotting package?</a></li><li><a href="#Do-Gnuplot.jl-suits-my-needs?-1">Do Gnuplot.jl suits my needs?</a></li><li><a href="#Notation-1">Notation</a></li><li><a href="#Table-of-Contents-1">Table of Contents</a></li></ul><li><a href="install/#Installation-1">Installation</a></li><ul><li><a href="install/#Prerequisite-1">Prerequisite</a></li><li><a href="install/#Package-installation-1">Package installation</a></li><li><a href="install/#Check-installation-1">Check installation</a></li></ul><li><a href="basic/#Basic-usage-1">Basic usage</a></li><ul><li><a href="basic/#plots2d-1">2D plots</a></li><li><a href="basic/#Keywords-for-common-commands-1">Keywords for common commands</a></li><li><a href="basic/#Plot-images-1">Plot images</a></li><li><a href="basic/#plots3d-1">3D plots</a></li><li><a href="basic/#Palettes-and-line-types-1">Palettes and line types</a></li><li><a href="basic/#Exporting-plots-to-files-1">Exporting plots to files</a></li><li><a href="basic/#Gnuplot-scripts-1">Gnuplot scripts</a></li></ul><li><a href="advanced/#Advanced-techniques-1">Advanced techniques</a></li><ul><li><a href="advanced/#Multiplot-1">Multiplot</a></li><li><a href="advanced/#Multiple-processes-1">Multiple processes</a></li><li><a href="advanced/#Named-datasets-1">Named datasets</a></li><li><a href="advanced/#Histograms-(1D)-1">Histograms (1D)</a></li><li><a href="advanced/#Histograms-(2D)-1">Histograms (2D)</a></li><li><a href="advanced/#Contour-lines-1">Contour lines</a></li><li><a href="advanced/#Animations-1">Animations</a></li><li><a href="advanced/#Dry-sessions-1">Dry sessions</a></li><li><a href="advanced/#Options-1">Options</a></li></ul><li><a href="examples/#Examples-1">Examples</a></li><li><a href="api/#API-1">API</a></li></ul></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="install/">Installation »</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 26 March 2020 09:53">Thursday 26 March 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>