diff --git a/ChangeLog.md b/ChangeLog.md index 0a66d64..fbc96e6 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,45 +1,52 @@ # Version 1.2.0 (not yet released) - New features: - * REPL mode: a new `Gnuplot.repl_init()` function is available to + * REPL mode: a new `Gnuplot.repl_init()` function is available to install a gnuplot REPL; - * `@gp` and `@gsp` now accepts a `Gnuplot.PlotElements` object, + * Implemented the "recipe" mechanism: the `recipe()` function can + now be extended to register new implicit recipes to display + data; + + * `@gp` and `@gsp` now accepts a `Gnuplot.PlotElements` object, containing commands, data and plot specifications in a single argument; - * The `recipe()` function can be extended to register new implicit - recipes to display input data; - - * The `linetypes` function now accept the `lw`, `ps` (to set the + * The `linetypes` function now accept the `lw`, `ps` (to set the line width and point size respectively), and the `dashed` (to use dashed patterns in place of solid lines) keywords; - * The new `Gnuplot.options.reset::Vector{String}` field allows to + * The new `Gnuplot.options.reset::Vector{String}` field allows to set initialization commands to be executed when a session is reset. Unlike `Gnuplot.options.init`, these commands are saved in the session and can be saved into a script; - * New functions: `gpvars()` to retrieve all gnuplot variables, + * New functions: `gpvars()` to retrieve all gnuplot variables, `gpmargins()` to retrieve current plot margins (in screen coordinates, `gpranges()` to retrieve current plot axis ranges; - - * New keywords for `@gp` and `@gsp`: `lmargin`, `rmargin`, - `bmargin`, `tmargin`, `margins`, to set plot margins; - -- New recipes: - * to display histograms (as returned by `hist()`); - * to display images; + * New keywords for `@gp` and `@gsp`: `lmargin`, `rmargin`, + `bmargin`, `tmargin`, `margins`, to set plot margins; + + * Implemented new implicit recipes to display histograms (as + returned by `hist()`) and images; + + * Documentation updated; + + +- Breaking changes: + * The 2D matrix are now sent to gnuplot in a column-major order, + to comply with Julia array layout; + - Bugfix: - * When a `Vector{String}` is passed to `driver()` it used to be - modified, and couldn't be used again in a second call. Now the - original is preserved; + * When a `Vector{String}` is passed to `driver()` it used to be + modified, and couldn't be used again in a second call. Now the + original is preserved; - * `contourlines()` used to return a single blanck line to - distinguish iso-contour lines, and this may cause problems in 3D - plot. Now two blanck lines are returned; + * `contourlines()` used to return a single blanck line to + distinguish iso-contour lines, and this may cause problems in 3D + plot. Now two blanck lines are returned; # Version 1.1.0 (released on: Apr. 09, 2020) diff --git a/README.md b/README.md index 458d507..74eed38 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,21 @@ Install with: ```julia -]add Gnuplot@1.1.0 +]add Gnuplot ``` A working [gnuplot](http://gnuplot.sourceforge.net/) package must be installed on your platform. +You may check the installed **Gnuplot.jl** version with: +```julia +]st Gnuplot +``` +If the displayed version is not v1.1.0 you are probably having a dependency conflict. In this case try forcing installation of the latest version with: +```julia +]add Gnuplot@1.1.0 +``` +and check which package is causing the conflict. + + Test package: ```julia using Gnuplot @@ -43,9 +54,9 @@ save("parabola.gp") # => save a script file with both data and command to re-cr ```julia x = -2pi:0.1:2pi approx = fill(0., length(x)); -@gp t="Polynomial approximation of sin(x)" key="opaque" linetypes(:Blues_3) +@gp tit="Polynomial approximation of sin(x)" key="opaque" linetypes(:Blues_4) @gp :- "set encoding utf8" raw"""set xtics ('-π' -pi, '-π/2' -pi/2, 0, 'π/2' pi/2, 'π' pi)""" -@gp :- xr=3.8.*[-1, 1] yr=[-1.5,1.5] "set grid" +@gp :- xr=3.8.*[-1, 1] yr=[-1.5,1.5] "set grid front" @gp :- x sin.(x) approx .+= x "w filledcurve t 'n=0' lt 1" @gp :- x sin.(x) approx .+= -x.^3/6 "w filledcurve t 'n=1' lt 2" @gp :- x sin.(x) approx .+= x.^5/120 "w filledcurve t 'n=2' lt 3" diff --git a/docs/src/install.md b/docs/src/install.md index 532449a..a3f91e6 100644 --- a/docs/src/install.md +++ b/docs/src/install.md @@ -8,12 +8,27 @@ If `gnuplot` is not available in your platform you can still use **Gnuplot.jl** ## Package installation In the Julia REPL type: ```julia-repl -julia> ]add Gnuplot@1.2.0 +julia> ]add Gnuplot ``` -The `]` character starts the Julia [package manager](https://julialang.github.io/Pkg.jl/v1/getting-started.html#Basic-Usage-1). Then hit backspace key to return to Julia REPL. +The `]` character starts the Julia [package manager](https://julialang.github.io/Pkg.jl/v1/getting-started.html#Basic-Usage-1). Hit backspace key to return to Julia prompt. + ## Check installation +Check **Gnuplot.jl** version with: +```julia-repl +julia> ]st Gnuplot +Status `~/.julia/environments/v1.4/Project.toml` + [dc211083] Gnuplot v1.2.0 +``` +If the displayed version is not `v1.2.0` you are probably having a dependency conflict. In this case try forcing installation of the latest version with: +```julia-repl +julia> ]add Gnuplot@1.2.0 +``` +and check which package is causing the conflict. + + + Check execution and version of the underlying `gnuplot` process: ```@repl using Gnuplot diff --git a/examples/ex2.png b/examples/ex2.png index 2762c1b..238ed37 100644 Binary files a/examples/ex2.png and b/examples/ex2.png differ