diff --git a/src/args.jl b/src/args.jl index fed22366..76721f7b 100644 --- a/src/args.jl +++ b/src/args.jl @@ -41,6 +41,10 @@ PLOT_DEFAULTS[:xticks] = true PLOT_DEFAULTS[:yticks] = true 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 diff --git a/src/backends/gadfly.jl b/src/backends/gadfly.jl index bd8fcd52..7a292500 100644 --- a/src/backends/gadfly.jl +++ b/src/backends/gadfly.jl @@ -101,7 +101,7 @@ function plot!(::GadflyPackage, plt::Plot; kw...) push!(plt.seriesargs, d) # 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 end