fix get_subplot_index; fix pyplot colorbar
This commit is contained in:
parent
1cf514d1e6
commit
3cea2df459
@ -575,6 +575,7 @@ pymarkercolormap(d::KW) = getPyPlotColorMap(d[:markercolor], d[:markeralpha]
|
||||
pyfillcolormap(d::KW) = getPyPlotColorMap(d[:fillcolor], d[:fillalpha])
|
||||
|
||||
# function _add_series(pkg::PyPlotBackend, plt::Plot, d::KW)
|
||||
# TODO: change this to accept Subplot??
|
||||
function _add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
d = series.d
|
||||
st = d[:seriestype]
|
||||
@ -927,7 +928,7 @@ function _add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
handleSmooth(plt, ax, d, d[:smooth])
|
||||
|
||||
# add the colorbar legend
|
||||
if needs_colorbar && plt.plotargs[:colorbar] != :none
|
||||
if needs_colorbar && attr(d[:subplot], :colorbar) != :none
|
||||
# cbar = PyPlot.colorbar(handles[end], ax=ax)
|
||||
|
||||
# do we need a discrete colorbar?
|
||||
|
||||
@ -18,6 +18,6 @@ get_subplot(plt::Plot, k) = plt.spmap[k]
|
||||
get_subplot(series::Series) = series.d[:subplot]
|
||||
|
||||
get_subplot_index(plt::Plot, idx::Integer) = idx
|
||||
get_subplot_index(plt::Plot, sp::Subplot) = findfirst(sp->sp === plt.subplots[2], plt.subplots)
|
||||
get_subplot_index(plt::Plot, sp::Subplot) = findfirst(_ -> _ === sp, plt.subplots)
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user