added args and kwargs to PLOT_DEFAULTS
This commit is contained in:
parent
9ea98bcb56
commit
31da90865c
@ -41,6 +41,10 @@ PLOT_DEFAULTS[:xticks] = true
|
|||||||
PLOT_DEFAULTS[:yticks] = true
|
PLOT_DEFAULTS[:yticks] = true
|
||||||
PLOT_DEFAULTS[:size] = (600,400)
|
PLOT_DEFAULTS[:size] = (600,400)
|
||||||
|
|
||||||
|
PLOT_DEFAULTS[:args] = [] # additional args to pass to the backend
|
||||||
|
PLOT_DEFAULTS[:kwargs] = [] # additional keyword args to pass to the backend
|
||||||
|
# note: can be Vector{Dict} or Vector{Tuple}
|
||||||
|
|
||||||
# TODO: x/y scales
|
# TODO: x/y scales
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -101,7 +101,7 @@ function plot!(::GadflyPackage, plt::Plot; kw...)
|
|||||||
push!(plt.seriesargs, d)
|
push!(plt.seriesargs, d)
|
||||||
|
|
||||||
# add the layer to the Gadfly.Plot
|
# add the layer to the Gadfly.Plot
|
||||||
prepend!(plt.o.layers, Gadfly.layer(unique(gfargs)...; x = x, y = d[:y]))
|
prepend!(plt.o.layers, Gadfly.layer(unique(gfargs)..., d[:args]...; x = x, y = d[:y], d[:kwargs]...))
|
||||||
plt
|
plt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user