trying fgcolor gadfly

This commit is contained in:
Thomas Breloff 2015-09-22 00:04:35 -04:00
parent dc5da28176
commit f2bcb77cfb
4 changed files with 11 additions and 5 deletions

View File

@ -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"))]),

View File

@ -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

View File

@ -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

View File

@ -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]