Docs updated

This commit is contained in:
Giorgio Calderone 2020-04-16 14:16:01 +02:00
parent 70e12809c4
commit 519731e4dd
7 changed files with 19 additions and 11 deletions

View File

@ -6,7 +6,7 @@ mkpath("assets")
empty!(Gnuplot.options.init) empty!(Gnuplot.options.init)
push!( Gnuplot.options.init, "set term unknown") push!( Gnuplot.options.init, "set term unknown")
empty!(Gnuplot.options.reset) empty!(Gnuplot.options.reset)
push!( Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5)) push!( Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5, ps=1.5))
saveas(file) = save(term="pngcairo size 550,350 fontscale 0.8", output="assets/$(file).png") saveas(file) = save(term="pngcairo size 550,350 fontscale 0.8", output="assets/$(file).png")
``` ```

View File

@ -14,10 +14,14 @@ boxxyerror
contourlines contourlines
dataset_names dataset_names
gpexec gpexec
gpmargins
gpranges
gpvars
hist hist
linetypes linetypes
palette palette
palette_names palette_names
recipe
save save
session_names session_names
stats stats
@ -41,5 +45,6 @@ Gnuplot.Path2d
Gnuplot.gpversion Gnuplot.gpversion
Gnuplot.quit Gnuplot.quit
Gnuplot.quitall Gnuplot.quitall
Gnuplot.repl_init
Gnuplot.version Gnuplot.version
``` ```

View File

@ -6,7 +6,7 @@ Gnuplot.splash("assets/logo.png")
empty!(Gnuplot.options.init) empty!(Gnuplot.options.init)
push!( Gnuplot.options.init, "set term unknown") push!( Gnuplot.options.init, "set term unknown")
empty!(Gnuplot.options.reset) empty!(Gnuplot.options.reset)
push!( Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5)) push!( Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5, ps=1.5))
saveas(file) = save(term="pngcairo size 550,350 fontscale 0.8", output="assets/$(file).png") saveas(file) = save(term="pngcairo size 550,350 fontscale 0.8", output="assets/$(file).png")
``` ```
@ -239,7 +239,7 @@ The first plot features the `:Set1_5` palette, with solid lines whose width is 2
As discussed in [Options](@ref), you may set a default line types for all plots with: As discussed in [Options](@ref), you may set a default line types for all plots with:
```julia ```julia
push!(Gnuplot.options.init, linetypes(:Set1_5, lw=2)) push!(Gnuplot.options.init, linetypes(:Set1_5, lw=1.5, ps=1.5))
``` ```
All plot in this documentation were generated with these settings. All plot in this documentation were generated with these settings.

View File

@ -6,7 +6,7 @@ mkpath("assets")
empty!(Gnuplot.options.init) empty!(Gnuplot.options.init)
push!( Gnuplot.options.init, "set term unknown") push!( Gnuplot.options.init, "set term unknown")
empty!(Gnuplot.options.reset) empty!(Gnuplot.options.reset)
push!( Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5)) push!( Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5, ps=1.5))
saveas(file) = save(term="pngcairo size 550,350 fontscale 0.8", output="assets/$(file).png") saveas(file) = save(term="pngcairo size 550,350 fontscale 0.8", output="assets/$(file).png")
``` ```
@ -25,7 +25,7 @@ Note that this is option affect all the newly created sessions, not the older on
- `reset::Vector{String}`: initialization commands to be executed when a session is reset. Default is an empty vector. It can be used to, e.g., set custom linetypes or palette: - `reset::Vector{String}`: initialization commands to be executed when a session is reset. Default is an empty vector. It can be used to, e.g., set custom linetypes or palette:
```@repl abc ```@repl abc
push!(Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5)); push!(Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5, ps=1.5));
``` ```
Note that this is option affect all the sessions. Also note that the commands in `Gnuplot.options.reset` **are** saved in [Gnuplot scripts](@ref); Note that this is option affect all the sessions. Also note that the commands in `Gnuplot.options.reset` **are** saved in [Gnuplot scripts](@ref);
@ -38,8 +38,8 @@ x = 1.:10;
@gp x x.^2 "w l t 'Parabola'" @gp x x.^2 "w l t 'Parabola'"
save(term="pngcairo size 480,360 fontscale 0.8", output="output.png") save(term="pngcairo size 480,360 fontscale 0.8", output="output.png")
Gnuplot.options.verbose = false # hide Gnuplot.options.verbose = false # hide
push!( Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5)); # hide push!(Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5)); # hide
gpexec("set term unknown"); # hide gpexec("set term unknown"); # hide
``` ```
Each line reports the package name (`GNUPLOT`), the session name (`default`), the command or string being sent to gnuplot process, and the returned response (line starting with `->`). Default value is `false`; Each line reports the package name (`GNUPLOT`), the session name (`default`), the command or string being sent to gnuplot process, and the returned response (line starting with `->`). Default value is `false`;

View File

@ -6,7 +6,7 @@ mkpath("assets")
empty!(Gnuplot.options.init) empty!(Gnuplot.options.init)
push!( Gnuplot.options.init, "set term unknown") push!( Gnuplot.options.init, "set term unknown")
empty!(Gnuplot.options.reset) empty!(Gnuplot.options.reset)
push!( Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5)) push!( Gnuplot.options.reset, linetypes(:Set1_5, lw=1.5, ps=1.5))
saveas(file) = save(term="pngcairo size 550,350 fontscale 0.8", output="assets/$(file).png") saveas(file) = save(term="pngcairo size 550,350 fontscale 0.8", output="assets/$(file).png")
``` ```

View File

@ -1911,8 +1911,8 @@ end
# ╰───────────────────────────────────────────────────────────────────╯ # ╰───────────────────────────────────────────────────────────────────╯
# -------------------------------------------------------------------- # --------------------------------------------------------------------
""" """
gpvars()
gpvars(sid::Symbol) gpvars(sid::Symbol)
gpvars()
Return a `Dict{Symbol, Union{String, Real}}` with all currently defined gnuplot variables. If the `sid` argument is not provided, the default session is considered. Return a `Dict{Symbol, Union{String, Real}}` with all currently defined gnuplot variables. If the `sid` argument is not provided, the default session is considered.
""" """
@ -1945,8 +1945,8 @@ end
# -------------------------------------------------------------------- # --------------------------------------------------------------------
""" """
gpmargins()
gpmargins(sid::Symbol) gpmargins(sid::Symbol)
gpmargins()
Return a `NamedTuple` with keys `l`, `r`, `b` and `t` containing respectively the left, rigth, bottom and top margins of the current plot (in screen coordinates). Return a `NamedTuple` with keys `l`, `r`, `b` and `t` containing respectively the left, rigth, bottom and top margins of the current plot (in screen coordinates).
""" """
@ -1961,8 +1961,8 @@ function gpmargins(sid::Symbol)
end end
""" """
gpranges()
gpranges(sid::Symbol) gpranges(sid::Symbol)
gpranges()
Return a `NamedTuple` with keys `x`, `y`, `z` and `cb` containing respectively the current plot ranges for the X, Y, Z and color box axis. Return a `NamedTuple` with keys `x`, `y`, `z` and `cb` containing respectively the current plot ranges for the X, Y, Z and color box axis.
""" """

View File

@ -4,6 +4,9 @@
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# Histograms # Histograms
"""
recipe()
"""
recipe(h::Histogram1D) = recipe(h::Histogram1D) =
PlotElement(cmds="set grid", PlotElement(cmds="set grid",
data=DatasetText(h.bins, h.counts), data=DatasetText(h.bins, h.counts),