gadfly/immerse downgrade fix
This commit is contained in:
parent
9eab1083ab
commit
809ed02b85
@ -60,13 +60,26 @@ function getGadflyLineTheme(d::Dict)
|
|||||||
fc = RGBA(fc, α)
|
fc = RGBA(fc, α)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# gracefully handles old Gadfly versions
|
||||||
|
extra_theme_args = Dict()
|
||||||
|
try
|
||||||
|
extra_theme_args[:line_style] = Gadfly.get_stroke_vector(d[:linestyle])
|
||||||
|
catch err
|
||||||
|
if string(err) == "UndefVarError(:get_stroke_vector)"
|
||||||
|
Base.warn_once("Gadfly.get_stroke_vector failed... do you have an old version of Gadfly?")
|
||||||
|
else
|
||||||
|
rethrow()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Gadfly.Theme(;
|
Gadfly.Theme(;
|
||||||
default_color = lc,
|
default_color = lc,
|
||||||
line_width = (d[:linetype] == :sticks ? 1 : d[:linewidth]) * Gadfly.px,
|
line_width = (d[:linetype] == :sticks ? 1 : d[:linewidth]) * Gadfly.px,
|
||||||
line_style = Gadfly.get_stroke_vector(d[:linestyle]),
|
# line_style = Gadfly.get_stroke_vector(d[:linestyle]),
|
||||||
lowlight_color = x->RGB(fc), # fill/ribbon
|
lowlight_color = x->RGB(fc), # fill/ribbon
|
||||||
lowlight_opacity = alpha(fc), # fill/ribbon
|
lowlight_opacity = alpha(fc), # fill/ribbon
|
||||||
bar_highlight = RGB(lc), # bars
|
bar_highlight = RGB(lc), # bars
|
||||||
|
extra_theme_args...
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user