diff --git a/src/geom/line.jl b/src/geom/line.jl index bf53737c..4f9a507b 100644 --- a/src/geom/line.jl +++ b/src/geom/line.jl @@ -111,12 +111,16 @@ function Gadfly.Geom.render(geom::LineGeometry, theme::Gadfly.Theme, aes::Gadfly default_aes.group = IndirectArray([1]) default_aes.color = [theme.default_color] default_aes.linestyle = theme.line_style[1:1] + default_aes.size = Measure[theme.point_size] + default_aes.shape = Function[theme.point_shapes[1]] + default_aes.alpha = [theme.alphas[1]] aes = inherit(aes, default_aes) # Render lines, using multivariate groupings: XT, YT = eltype(aes.x), eltype(aes.y) - GT, CT, LST = Int, eltype(aes.color), eltype(aes.linestyle) - groups = collect(Tuple{GT, CT, LST}, Compose.cyclezip(aes.group, aes.color, aes.linestyle)) + GT, CT, LST, SzT, ShT, AT = Int, eltype(aes.color), eltype(aes.linestyle), eltype(aes.size), eltype(aes.shape), eltype(aes.alpha) + groups = collect(Tuple{GT, CT, LST, SzT, ShT, AT}, + Compose.cyclezip(aes.group, aes.color, aes.linestyle, aes.size, aes.shape, aes.alpha)) ugroups = unique(groups) nugroups = length(ugroups) # Recycle groups diff --git a/test/testscripts/twolines_size_shape_alpha.jl b/test/testscripts/twolines_size_shape_alpha.jl new file mode 100644 index 00000000..c4fb6169 --- /dev/null +++ b/test/testscripts/twolines_size_shape_alpha.jl @@ -0,0 +1,12 @@ +using Gadfly + +set_default_plot_size(12inch, 3inch) + +p_size = plot(x=[1,2,3,1,2,3], y=[1,2,3,4,5,6], size=[1,1,1,2,2,2], + Geom.line, Geom.point, Scale.size_discrete2(n->range(3pt, 8pt, length=n))) +p_shape = plot(x=[1,2,3,1,2,3], y=[1,2,3,4,5,6], shape=[1,1,1,2,2,2], + Geom.line, Geom.point) +p_alpha = plot(x=[1,2,3,1,2,3], y=[1,2,3,4,5,6], alpha=[1,1,1,0.5,0.5,0.5], + Geom.line, Geom.point) + +hstack(p_size, p_shape, p_alpha)