trying fgcolor gadfly
This commit is contained in:
parent
dc5da28176
commit
f2bcb77cfb
@ -33,7 +33,7 @@ const examples = PlotExample[
|
|||||||
[:(plot(sin, x->sin(2x), 0, 2π, legend=false))]),
|
[:(plot(sin, x->sin(2x), 0, 2π, legend=false))]),
|
||||||
PlotExample("Global",
|
PlotExample("Global",
|
||||||
"Change the guides/background without a separate call.",
|
"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",
|
PlotExample("Two-axis",
|
||||||
"Use the `axis` or `axiss` arguments.\n\nNote: Currently only supported with Qwt and PyPlot",
|
"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"))]),
|
[:(plot(Vector[randn(100), randn(100)*100]; axiss = [:left,:right], ylabel="LEFT", yrightlabel="RIGHT"))]),
|
||||||
|
|||||||
@ -104,7 +104,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function addGadflySeries!(gplt, d::Dict)
|
function addGadflySeries!(gplt, d::Dict, initargs::Dict)
|
||||||
|
|
||||||
gfargs = []
|
gfargs = []
|
||||||
|
|
||||||
@ -121,9 +121,15 @@ function addGadflySeries!(gplt, d::Dict)
|
|||||||
|
|
||||||
# set theme: color, line width, and point size
|
# 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
|
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],
|
theme = Gadfly.Theme(; default_color = d[:color],
|
||||||
line_width = line_width,
|
line_width = line_width,
|
||||||
default_point_size = 0.5 * d[:markersize] * Gadfly.px,
|
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...)
|
extra_theme_args...)
|
||||||
# line_style = line_style)
|
# line_style = line_style)
|
||||||
push!(gfargs, theme)
|
push!(gfargs, theme)
|
||||||
@ -199,7 +205,7 @@ end
|
|||||||
# plot one data series
|
# plot one data series
|
||||||
function plot!(::GadflyPackage, plt::Plot; kw...)
|
function plot!(::GadflyPackage, plt::Plot; kw...)
|
||||||
d = Dict(kw)
|
d = Dict(kw)
|
||||||
addGadflySeries!(plt.o, d)
|
addGadflySeries!(plt.o, d, plt.initargs)
|
||||||
push!(plt.seriesargs, d)
|
push!(plt.seriesargs, d)
|
||||||
plt
|
plt
|
||||||
end
|
end
|
||||||
|
|||||||
@ -38,7 +38,7 @@ end
|
|||||||
function plot!(::ImmersePackage, plt::Plot; kw...)
|
function plot!(::ImmersePackage, plt::Plot; kw...)
|
||||||
d = Dict(kw)
|
d = Dict(kw)
|
||||||
gplt = plt.o[2]
|
gplt = plt.o[2]
|
||||||
addGadflySeries!(gplt, d)
|
addGadflySeries!(gplt, d, plt.initargs)
|
||||||
push!(plt.seriesargs, d)
|
push!(plt.seriesargs, d)
|
||||||
plt
|
plt
|
||||||
end
|
end
|
||||||
|
|||||||
@ -10,7 +10,7 @@ unicodeplots!() = plotter!(:unicodeplots)
|
|||||||
|
|
||||||
supportedArgs(::UnicodePlotsPackage) = setdiff(_allArgs, [:reg, :heatmap_c, :fillto, :pos])
|
supportedArgs(::UnicodePlotsPackage) = setdiff(_allArgs, [:reg, :heatmap_c, :fillto, :pos])
|
||||||
supportedAxes(::UnicodePlotsPackage) = [:auto, :left]
|
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]
|
supportedStyles(::UnicodePlotsPackage) = [:auto, :solid]
|
||||||
supportedMarkers(::UnicodePlotsPackage) = [:none, :auto, :ellipse]
|
supportedMarkers(::UnicodePlotsPackage) = [:none, :auto, :ellipse]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user