Add :pixel to native seriestype for pyplot and gr
This commit is contained in:
parent
55afb20a09
commit
bb936346e4
@ -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)
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user