gadfly color fixes; pyplot grid support
This commit is contained in:
parent
834ba9bc61
commit
373d868a17
@ -127,7 +127,7 @@ function getGadflyMarkerTheme(d::Dict, initargs::Dict)
|
||||
Gadfly.Theme(
|
||||
default_color = c,
|
||||
default_point_size = d[:markersize] * Gadfly.px,
|
||||
discrete_highlight_color = c -> fg,
|
||||
discrete_highlight_color = c -> RGB(fg),
|
||||
highlight_width = d[:linewidth] * Gadfly.px,
|
||||
)
|
||||
end
|
||||
@ -145,7 +145,7 @@ function addGadflyMarker!(plt::Plot, d::Dict, initargs::Dict, geoms...)
|
||||
if !isa(d[:markercolor], ColorGradient)
|
||||
d[:markercolor] = colorscheme(:bluesreds)
|
||||
end
|
||||
push!(getGadflyContext(plt).scales, Gadfly.Scale.ContinuousColorScale(p -> RGBA(getColorZ(d[:markercolor], p))))
|
||||
push!(getGadflyContext(plt).scales, Gadfly.Scale.ContinuousColorScale(p -> RGB(getColorZ(d[:markercolor], p))))
|
||||
end
|
||||
|
||||
Gadfly.layer(gfargs...; x = d[:x], y = d[:y], kwargs...)
|
||||
|
||||
@ -423,6 +423,13 @@ function updatePlotItems(plt::Plot{PyPlotPackage}, d::Dict)
|
||||
lab[:set_fontsize](sz)
|
||||
end
|
||||
end
|
||||
|
||||
# grid
|
||||
if get(d, :grid, false)
|
||||
ax[:xaxis][:grid](true)
|
||||
ax[:yaxis][:grid](true)
|
||||
ax[:set_axisbelow](true)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -123,7 +123,7 @@ supportedArgs(::PyPlotPackage) = [
|
||||
:tickfont,
|
||||
:guidefont,
|
||||
:legendfont,
|
||||
# :grid,
|
||||
:grid,
|
||||
:surface,
|
||||
:nlevels,
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user