Add support for levels keyword in PyPlot
This commit is contained in:
parent
ed7cc9b89e
commit
c09545de64
@ -139,6 +139,7 @@ _seriesDefaults[:z] = nothing # depth for contour, surfa
|
|||||||
_seriesDefaults[:zcolor] = nothing # value for color scale
|
_seriesDefaults[:zcolor] = nothing # value for color scale
|
||||||
# _seriesDefaults[:surface] = nothing
|
# _seriesDefaults[:surface] = nothing
|
||||||
_seriesDefaults[:nlevels] = 15
|
_seriesDefaults[:nlevels] = 15
|
||||||
|
_seriesDefaults[:levels] = nothing
|
||||||
_seriesDefaults[:orientation] = :vertical
|
_seriesDefaults[:orientation] = :vertical
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -338,9 +338,16 @@ function _add_series(pkg::PyPlotPackage, plt::Plot; kw...)
|
|||||||
# and take the transpose of the surface matrix
|
# and take the transpose of the surface matrix
|
||||||
x, y = d[:x], d[:y]
|
x, y = d[:x], d[:y]
|
||||||
surf = d[:z].surf'
|
surf = d[:z].surf'
|
||||||
handle = plotfunc(x, y, surf, d[:nlevels]; extra_kwargs...)
|
if d[:levels] != nothing
|
||||||
if d[:fillrange] != nothing
|
handle = plotfunc(x, y, surf; levels=d[:levels], extra_kwargs...)
|
||||||
handle = ax[:contourf](x, y, surf, d[:nlevels]; cmap = getPyPlotColorMap(d[:fillcolor], d[:fillalpha]))
|
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
|
end
|
||||||
handle
|
handle
|
||||||
elseif lt in (:surface,:wireframe)
|
elseif lt in (:surface,:wireframe)
|
||||||
|
|||||||
@ -155,6 +155,7 @@ supportedArgs(::PyPlotPackage) = [
|
|||||||
:grid,
|
:grid,
|
||||||
# :surface,
|
# :surface,
|
||||||
:nlevels,
|
:nlevels,
|
||||||
|
:levels,
|
||||||
:fillalpha,
|
:fillalpha,
|
||||||
:linealpha,
|
:linealpha,
|
||||||
:markeralpha,
|
:markeralpha,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user