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(
|
Gadfly.Theme(
|
||||||
default_color = c,
|
default_color = c,
|
||||||
default_point_size = d[:markersize] * Gadfly.px,
|
default_point_size = d[:markersize] * Gadfly.px,
|
||||||
discrete_highlight_color = c -> fg,
|
discrete_highlight_color = c -> RGB(fg),
|
||||||
highlight_width = d[:linewidth] * Gadfly.px,
|
highlight_width = d[:linewidth] * Gadfly.px,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -145,7 +145,7 @@ function addGadflyMarker!(plt::Plot, d::Dict, initargs::Dict, geoms...)
|
|||||||
if !isa(d[:markercolor], ColorGradient)
|
if !isa(d[:markercolor], ColorGradient)
|
||||||
d[:markercolor] = colorscheme(:bluesreds)
|
d[:markercolor] = colorscheme(:bluesreds)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
Gadfly.layer(gfargs...; x = d[:x], y = d[:y], kwargs...)
|
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)
|
lab[:set_fontsize](sz)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# grid
|
||||||
|
if get(d, :grid, false)
|
||||||
|
ax[:xaxis][:grid](true)
|
||||||
|
ax[:yaxis][:grid](true)
|
||||||
|
ax[:set_axisbelow](true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@ -123,7 +123,7 @@ supportedArgs(::PyPlotPackage) = [
|
|||||||
:tickfont,
|
:tickfont,
|
||||||
:guidefont,
|
:guidefont,
|
||||||
:legendfont,
|
:legendfont,
|
||||||
# :grid,
|
:grid,
|
||||||
:surface,
|
:surface,
|
||||||
:nlevels,
|
:nlevels,
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user