Merge pull request #99 from dlfivefifty/pull-request/c09545de
Add support for levels keyword in PyPlot
This commit is contained in:
commit
489877d6bf
@ -139,6 +139,7 @@ _seriesDefaults[:z] = nothing # depth for contour, surfa
|
||||
_seriesDefaults[:zcolor] = nothing # value for color scale
|
||||
# _seriesDefaults[:surface] = nothing
|
||||
_seriesDefaults[:nlevels] = 15
|
||||
_seriesDefaults[:levels] = nothing
|
||||
_seriesDefaults[:orientation] = :vertical
|
||||
|
||||
|
||||
|
||||
@ -338,10 +338,17 @@ function _add_series(pkg::PyPlotPackage, plt::Plot; kw...)
|
||||
# and take the transpose of the surface matrix
|
||||
x, y = d[:x], d[:y]
|
||||
surf = d[:z].surf'
|
||||
if d[:levels] != nothing
|
||||
handle = plotfunc(x, y, surf; levels=d[:levels], extra_kwargs...)
|
||||
if d[:fillrange] != nothing
|
||||
handle = ax[:contourf](x, y, surf; levels=d[:levels], cmap = getPyPlotColorMap(d[:fillcolor], d[:fillalpha]))
|
||||
end
|
||||
else
|
||||
handle = plotfunc(x, y, surf, d[:nlevels]; extra_kwargs...)
|
||||
if d[:fillrange] != nothing
|
||||
handle = ax[:contourf](x, y, surf, d[:nlevels]; cmap = getPyPlotColorMap(d[:fillcolor], d[:fillalpha]))
|
||||
end
|
||||
end
|
||||
handle
|
||||
elseif lt in (:surface,:wireframe)
|
||||
x, y, z = if isa(d[:x], AMat) && isa(d[:y], AMat)
|
||||
|
||||
@ -155,6 +155,7 @@ supportedArgs(::PyPlotPackage) = [
|
||||
:grid,
|
||||
# :surface,
|
||||
:nlevels,
|
||||
:levels,
|
||||
:fillalpha,
|
||||
:linealpha,
|
||||
:markeralpha,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user