allow to pass a vector of colors for contour lines in PyPlot
This commit is contained in:
parent
fdb2ee2847
commit
cd4b41a537
@ -646,13 +646,18 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
extrakw[:extend3d] = true
|
extrakw[:extend3d] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if typeof(series[:linecolor]) <: AbstractArray
|
||||||
|
extrakw[:colors] = py_color.(series[:linecolor])
|
||||||
|
else
|
||||||
|
extrakw[:cmap] = py_linecolormap(series)
|
||||||
|
end
|
||||||
|
|
||||||
# contour lines
|
# contour lines
|
||||||
handle = ax[:contour](x, y, z, levelargs...;
|
handle = ax[:contour](x, y, z, levelargs...;
|
||||||
label = series[:label],
|
label = series[:label],
|
||||||
zorder = series[:series_plotindex],
|
zorder = series[:series_plotindex],
|
||||||
linewidths = py_dpi_scale(plt, series[:linewidth]),
|
linewidths = py_dpi_scale(plt, series[:linewidth]),
|
||||||
linestyles = py_linestyle(st, series[:linestyle]),
|
linestyles = py_linestyle(st, series[:linestyle]),
|
||||||
cmap = py_linecolormap(series),
|
|
||||||
extrakw...
|
extrakw...
|
||||||
)
|
)
|
||||||
if series[:contour_labels] == true
|
if series[:contour_labels] == true
|
||||||
@ -665,7 +670,6 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
handle = ax[:contourf](x, y, z, levelargs...;
|
handle = ax[:contourf](x, y, z, levelargs...;
|
||||||
label = series[:label],
|
label = series[:label],
|
||||||
zorder = series[:series_plotindex] + 0.5,
|
zorder = series[:series_plotindex] + 0.5,
|
||||||
cmap = py_fillcolormap(series),
|
|
||||||
extrakw...
|
extrakw...
|
||||||
)
|
)
|
||||||
push!(handles, handle)
|
push!(handles, handle)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user