added pixel marker for pyplot

This commit is contained in:
Thomas Breloff 2016-09-19 22:23:35 -04:00
parent ec17d557a7
commit 555145a650
2 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,7 @@ const _pyplot_seriestype = [
:contour, :contour3d, :path3d, :scatter3d, :surface, :wireframe
]
const _pyplot_style = [:auto, :solid, :dash, :dot, :dashdot]
const _pyplot_marker = _allMarkers
const _pyplot_marker = vcat(_allMarkers, :pixel)
const _pyplot_scale = [:identity, :ln, :log2, :log10]
is_marker_supported(::PyPlotBackend, shape::Shape) = true
@ -189,6 +189,7 @@ function py_marker(marker::Symbol)
marker == :pentagon && return "p"
marker == :hexagon && return "h"
marker == :octagon && return "8"
marker == :pixel && return ","
haskey(_shapes, marker) && return py_marker(_shapes[marker])
warn("Unknown marker $marker")

View File

@ -498,7 +498,7 @@ trueOrAllTrue(f::Function, x) = f(x)
allLineTypes(arg) = trueOrAllTrue(a -> get(_typeAliases, a, a) in _allTypes, arg)
allStyles(arg) = trueOrAllTrue(a -> get(_styleAliases, a, a) in _allStyles, arg)
allShapes(arg) = trueOrAllTrue(a -> get(_markerAliases, a, a) in _allMarkers, arg) ||
allShapes(arg) = trueOrAllTrue(a -> is_marker_supported(get(_markerAliases, a, a)), arg) ||
trueOrAllTrue(a -> isa(a, Shape), arg)
allAlphas(arg) = trueOrAllTrue(a -> (typeof(a) <: Real && a > 0 && a < 1) ||
(typeof(a) <: AbstractFloat && (a == zero(typeof(a)) || a == one(typeof(a)))), arg)