diff --git a/src/backends.jl b/src/backends.jl index 6d586358..b9955d45 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -355,6 +355,7 @@ const _gr_seriestype = [ :wireframe, :volume, :shape, + :pixel, ] const _gr_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot] const _gr_marker = _allMarkers @@ -566,6 +567,7 @@ const _pyplot_seriestype = [ :scatter3d, :surface, :wireframe, + :pixel, ] const _pyplot_style = [:auto, :solid, :dash, :dot, :dashdot] const _pyplot_marker = vcat(_allMarkers, :pixel) diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index 1ae4123d..92e4fef4 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -479,6 +479,11 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series) end end + if st == :pixel + handle = ax."plot"(x, y, ",") + push!(handles, handle) + end + # add markers? if series[:markershape] != :none && st in (:path, :scatter, :path3d, :scatter3d, :steppre, :steppost, diff --git a/src/recipes.jl b/src/recipes.jl index 3fc4d0d8..9b6a07cd 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -174,12 +174,15 @@ end end @deps scatterpath path scatter +# --------------------------------------------------------------------------- +# pixel + @recipe function f(::Type{Val{:pixel}}, x, y, z) x := x y := y + seriestype := :pixel markersize := 1 markerstrokewidth --> 0 - seriestype := :scatter () end