pyplot trisurface support
This commit is contained in:
parent
6c9e818abd
commit
b9d20142a2
@ -492,6 +492,7 @@ function _add_series(pkg::PyPlotBackend, plt::Plot, d::KW)
|
||||
end
|
||||
|
||||
if lt in (:surface, :wireframe)
|
||||
if typeof(z) <: AbstractMatrix
|
||||
x, y, z = map(Array, (x,y,z))
|
||||
if !ismatrix(x) || !ismatrix(y)
|
||||
x = repmat(x', length(y), 1)
|
||||
@ -512,6 +513,22 @@ function _add_series(pkg::PyPlotBackend, plt::Plot, d::KW)
|
||||
extrakw...
|
||||
)
|
||||
push!(handles, handle)
|
||||
|
||||
elseif typeof(z) <: AbstractVector
|
||||
# tri-surface plot (http://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html#tri-surface-plots)
|
||||
handle = ax[:plot_trisurf](x, y, z;
|
||||
label = d[:label],
|
||||
zorder = plt.n,
|
||||
cmap = pyfillcolormap(d),
|
||||
linewidth = d[:linewidth],
|
||||
edgecolor = pylinecolor(d)
|
||||
)
|
||||
push!(handles, handle)
|
||||
needs_colorbar = true
|
||||
else
|
||||
error("Unsupported z type $(typeof(z)) for linetype=$lt")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if lt == :heatmap
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user