diff --git a/docs/example_generation.jl b/docs/example_generation.jl index bde3229b..4a7a91ce 100644 --- a/docs/example_generation.jl +++ b/docs/example_generation.jl @@ -33,7 +33,7 @@ const examples = PlotExample[ [:(plot(sin, x->sin(2x), 0, 2π, legend=false))]), PlotExample("Global", "Change the guides/background without a separate call.", - [:(plot(rand(10); title="TITLE", xlabel="XLABEL", ylabel="YLABEL", background_color = RGB(0.5,0.5,0.5)))]), + [:(plot(rand(10); title="TITLE", xlabel="XLABEL", ylabel="YLABEL", background_color = RGB(0.2,0.2,0.2)))]), PlotExample("Two-axis", "Use the `axis` or `axiss` arguments.\n\nNote: Currently only supported with Qwt and PyPlot", [:(plot(Vector[randn(100), randn(100)*100]; axiss = [:left,:right], ylabel="LEFT", yrightlabel="RIGHT"))]), diff --git a/src/backends/gadfly.jl b/src/backends/gadfly.jl index 4f52ad86..46156778 100644 --- a/src/backends/gadfly.jl +++ b/src/backends/gadfly.jl @@ -104,7 +104,7 @@ end -function addGadflySeries!(gplt, d::Dict) +function addGadflySeries!(gplt, d::Dict, initargs::Dict) gfargs = [] @@ -121,9 +121,15 @@ function addGadflySeries!(gplt, d::Dict) # set theme: color, line width, and point size line_width = d[:width] * (d[:linetype] == :none ? 0 : 1) * Gadfly.px # 0 width when we don't show a line + # fg = initargs[:foreground_color] theme = Gadfly.Theme(; default_color = d[:color], line_width = line_width, default_point_size = 0.5 * d[:markersize] * Gadfly.px, + # grid_color = fg, + # minor_label_color = fg, + # major_label_color = fg, + # key_title_color = fg, + # key_label_color = fg, extra_theme_args...) # line_style = line_style) push!(gfargs, theme) @@ -199,7 +205,7 @@ end # plot one data series function plot!(::GadflyPackage, plt::Plot; kw...) d = Dict(kw) - addGadflySeries!(plt.o, d) + addGadflySeries!(plt.o, d, plt.initargs) push!(plt.seriesargs, d) plt end diff --git a/src/backends/immerse.jl b/src/backends/immerse.jl index f9cfb32a..7344a56b 100644 --- a/src/backends/immerse.jl +++ b/src/backends/immerse.jl @@ -38,7 +38,7 @@ end function plot!(::ImmersePackage, plt::Plot; kw...) d = Dict(kw) gplt = plt.o[2] - addGadflySeries!(gplt, d) + addGadflySeries!(gplt, d, plt.initargs) push!(plt.seriesargs, d) plt end diff --git a/src/backends/unicodeplots.jl b/src/backends/unicodeplots.jl index 58810897..f83aebf0 100644 --- a/src/backends/unicodeplots.jl +++ b/src/backends/unicodeplots.jl @@ -10,7 +10,7 @@ unicodeplots!() = plotter!(:unicodeplots) supportedArgs(::UnicodePlotsPackage) = setdiff(_allArgs, [:reg, :heatmap_c, :fillto, :pos]) supportedAxes(::UnicodePlotsPackage) = [:auto, :left] -supportedTypes(::UnicodePlotsPackage) = [:none, :line, :path, :step, :sticks, :scatter, :heatmap, :hexbin, :hist, :bar, :hline, :vline] +supportedTypes(::UnicodePlotsPackage) = [:none, :line, :path, :steppost, :sticks, :scatter, :heatmap, :hexbin, :hist, :bar] supportedStyles(::UnicodePlotsPackage) = [:auto, :solid] supportedMarkers(::UnicodePlotsPackage) = [:none, :auto, :ellipse]