diff --git a/README.md b/README.md index 80e955d..cb0e400 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build Status](https://travis-ci.org/gcalderone/Gnuplot.jl.svg?branch=master)](https://travis-ci.org/gcalderone/Gnuplot.jl) [![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md) -[![DocumentationStatus](https://img.shields.io/badge/docs-latest-blue.svg?style=flat)](https://gcalderone.github.io/Gnuplot.jl/dev/) +[![DocumentationStatus](https://img.shields.io/badge/docs-latest-blue.svg?style=flat)](https://gcalderone.github.io/Gnuplot.jl/v1.1.0/) **Gnuplot.jl** is a simple package able to send both data and commands from Julia to an underlying [gnuplot](http://gnuplot.sourceforge.net/) process. Its main purpose it to provide a fast and powerful data visualization framework, using an extremely concise Julia syntax. @@ -26,7 +26,7 @@ test_terminal() ``` ## Quick start -The following examples are supposed to be rather self-explaining. See [documentation](https://gcalderone.github.io/Gnuplot.jl/dev/) for further informations. +The following examples are supposed to be rather self-explaining. See [documentation](https://gcalderone.github.io/Gnuplot.jl/v1.1.0/) for further informations. ### A simple parabola ```julia diff --git a/docs/src/basic.md b/docs/src/basic.md index fd559ec..c6ce197 100644 --- a/docs/src/basic.md +++ b/docs/src/basic.md @@ -1,8 +1,26 @@ +```@setup abc +using Gnuplot +Gnuplot.quitall() +mkpath("assets") +Gnuplot.splash("assets/logo.png") +saveas(file) = save(term="pngcairo size 480,360 fontscale 0.8", output="assets/$(file).png") +empty!(Gnuplot.options.init) +gpexec("set term unknown") +``` + # Basic usage The main purpose of the **Gnuplot.jl** package is to send data and commands to the underlying gnuplot process, in order to generate plots. Unlike other packages, however, the actual commands to plot, or the plot attributes, are not specified through function calls. This is what makes **Gnuplot.jl** *easy to learn and use*: there are no functions or keywords names to memorize[^1]. -The most important symbols exported by the package are the [`@gp`](@ref) (for 2D plots) and [`@gsp`](@ref) (for 3D plots) macros, both accepting any number of arguments, and whose meaning is interpreted as follows: +The most important symbols exported by the package are the [`@gp`](@ref) (for 2D plots) and [`@gsp`](@ref) (for 3D plots) macros. The simplemost example is as follows: +```@example abc +@gp 1:20 +saveas("ex000") # hide +``` +![](assets/ex000.png) + + +Both macros accept any number of arguments, whose meaning is interpreted as follows: - one, or a group of consecutive, array(s) build up a dataset. The different arrays are accessible as columns 1, 2, etc. from the gnuplot process. The number of required input arrays depends on the chosen plot style (see gnuplot documentation); @@ -26,15 +44,6 @@ using Gnuplot ``` before running the examples. -```@setup abc -using Gnuplot -Gnuplot.quitall() -mkpath("assets") -Gnuplot.splash("assets/logo.png") -saveas(file) = save(term="pngcairo size 480,360 fontscale 0.8", output="assets/$(file).png") -empty!(Gnuplot.options.init) -gpexec("set term unknown") -``` diff --git a/docs/src/index.md b/docs/src/index.md index ca99849..e803d67 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -50,7 +50,7 @@ The functionalities 1, 2 and 3 listed above are similar to those provided by the 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 [2D plots](@ref plots2d)). 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. -**Gnuplot.jl** aims to be ready for even the most challenging plots by relying on the widely and long lasting used gnuplot application, and by allowing each native feature (both present and future ones) to be immediately available in the Julia language. Moreover, **Gnuplot.jl** provides a unique syntax specifically aimed to increase productivity while performing interactive data exploration. +**Gnuplot.jl** aims to be ready for even the most challenging plots by relying on the widely used gnuplot application, and by allowing each native feature (both present and future ones) to be immediately available in the Julia language. Moreover, **Gnuplot.jl** provides a unique syntax specifically aimed to increase productivity while performing interactive data exploration. Last but not least, have a look at the **Gnuplot.jl** [Examples](@ref) page.