revert pyplot changes

This commit is contained in:
Thomas Breloff 2016-02-19 21:59:43 -05:00
parent 732f2846de
commit 86fe244d95

View File

@ -30,7 +30,7 @@ end
# ------------------------------- # -------------------------------
# convert colorant to 4-tuple RGBA # convert colorant to 4-tuple RGBA
getPyPlotColor(c::Colorant, α=nothing) = map(f->float(f(convertColor(c,α))), [red, green, blue, alpha]) getPyPlotColor(c::Colorant, α=nothing) = map(f->float(f(convertColor(c,α))), (red, green, blue, alpha))
getPyPlotColor(cvec::ColorVector, α=nothing) = map(getPyPlotColor, convertColor(cvec, α).v) getPyPlotColor(cvec::ColorVector, α=nothing) = map(getPyPlotColor, convertColor(cvec, α).v)
getPyPlotColor(scheme::ColorScheme, α=nothing) = getPyPlotColor(convertColor(getColor(scheme), α)) getPyPlotColor(scheme::ColorScheme, α=nothing) = getPyPlotColor(convertColor(getColor(scheme), α))
getPyPlotColor(c, α=nothing) = getPyPlotColor(convertColor(c, α)) getPyPlotColor(c, α=nothing) = getPyPlotColor(convertColor(c, α))
@ -350,7 +350,7 @@ function _add_series(pkg::PyPlotPackage, plt::Plot; kw...)
extra_kwargs[:c] = convert(Vector{Float64}, d[:zcolor]) extra_kwargs[:c] = convert(Vector{Float64}, d[:zcolor])
extra_kwargs[:cmap] = getPyPlotColorMap(c, d[:markeralpha]) extra_kwargs[:cmap] = getPyPlotColorMap(c, d[:markeralpha])
else else
extra_kwargs[:c] = getPyPlotColor(c, d[:markeralpha])' extra_kwargs[:c] = getPyPlotColor(c, d[:markeralpha])
end end
if d[:markeralpha] != nothing if d[:markeralpha] != nothing
extra_kwargs[:alpha] = d[:markeralpha] extra_kwargs[:alpha] = d[:markeralpha]
@ -358,14 +358,13 @@ function _add_series(pkg::PyPlotPackage, plt::Plot; kw...)
extra_kwargs[:edgecolors] = getPyPlotColor(d[:markerstrokecolor], d[:markerstrokealpha]) extra_kwargs[:edgecolors] = getPyPlotColor(d[:markerstrokecolor], d[:markerstrokealpha])
extra_kwargs[:linewidths] = d[:markerstrokewidth] extra_kwargs[:linewidths] = d[:markerstrokewidth]
else else
extra_kwargs[:markersize] = d[:markersize].^2 extra_kwargs[:markersize] = d[:markersize]
extra_kwargs[:markerfacecolor] = getPyPlotColor(d[:markercolor], d[:markeralpha])' extra_kwargs[:markerfacecolor] = getPyPlotColor(d[:markercolor], d[:markeralpha])
extra_kwargs[:markeredgecolor] = getPyPlotColor(d[:markerstrokecolor], d[:markerstrokealpha]) extra_kwargs[:markeredgecolor] = getPyPlotColor(d[:markerstrokecolor], d[:markerstrokealpha])
extra_kwargs[:markeredgewidth] = d[:markerstrokewidth] extra_kwargs[:markeredgewidth] = d[:markerstrokewidth]
extra_kwargs[:drawstyle] = getPyPlotStepStyle(lt) extra_kwargs[:drawstyle] = getPyPlotStepStyle(lt)
end end
end end
dumpdict(extra_kwargs, "",true)
# if d[:markeralpha] != nothing # if d[:markeralpha] != nothing
# extra_kwargs[:alpha] = d[:markeralpha] # extra_kwargs[:alpha] = d[:markeralpha]