Updated
This commit is contained in:
parent
3a094601b5
commit
45dbec8db8
19
ChangeLog.md
19
ChangeLog.md
@ -4,13 +4,14 @@
|
||||
* REPL mode: a new `Gnuplot.repl_init()` function is available to
|
||||
install a gnuplot REPL;
|
||||
|
||||
* 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
|
||||
line width and point size respectively), and the `dashed` (to
|
||||
use dashed patterns in place of solid lines) keywords;
|
||||
@ -27,10 +28,16 @@
|
||||
* New keywords for `@gp` and `@gsp`: `lmargin`, `rmargin`,
|
||||
`bmargin`, `tmargin`, `margins`, to set plot margins;
|
||||
|
||||
- New recipes:
|
||||
* to display histograms (as returned by `hist()`);
|
||||
* 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;
|
||||
|
||||
* to display images;
|
||||
|
||||
- Bugfix:
|
||||
* When a `Vector{String}` is passed to `driver()` it used to be
|
||||
|
||||
17
README.md
17
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"
|
||||
|
||||
@ -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
|
||||
|
||||
BIN
examples/ex2.png
BIN
examples/ex2.png
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 38 KiB |
Loading…
x
Reference in New Issue
Block a user