Add stride to wireframe/surface

I only have this for PyPlot at the moment, I would be more than happy
to add other backends if people find it useful. Also, if people have
any ideas for aliases, then I would be happy to do that too.
This commit is contained in:
JackDevine 2017-08-15 20:10:02 +12:00
parent 11c71d7a5d
commit ad2eaf7aef
2 changed files with 6 additions and 2 deletions

View File

@ -214,6 +214,8 @@ const _series_defaults = KW(
:primary => true, # when true, this "counts" as a series for color selection, etc. the main use is to allow :primary => true, # when true, this "counts" as a series for color selection, etc. the main use is to allow
# one logical series to be broken up (path and markers, for example) # one logical series to be broken up (path and markers, for example)
:hover => nothing, # text to display when hovering over the data points :hover => nothing, # text to display when hovering over the data points
:rstride => 1, # array row stride for wireframe/surface
:cstride => 1, # array column stride for wireframe/surface
) )

View File

@ -31,6 +31,8 @@ const _pyplot_attr = merge_with_base_supported([
:inset_subplots, :inset_subplots,
:dpi, :dpi,
:colorbar_title, :colorbar_title,
:rstride,
:cstride,
]) ])
const _pyplot_seriestype = [ const _pyplot_seriestype = [
:path, :steppre, :steppost, :shape, :path, :steppre, :steppost, :shape,
@ -702,8 +704,8 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
handle = ax[st == :surface ? :plot_surface : :plot_wireframe](x, y, z; handle = ax[st == :surface ? :plot_surface : :plot_wireframe](x, y, z;
label = series[:label], label = series[:label],
zorder = series[:series_plotindex], zorder = series[:series_plotindex],
rstride = 1, rstride = series[:rstride],
cstride = 1, cstride = series[:cstride],
linewidth = py_dpi_scale(plt, series[:linewidth]), linewidth = py_dpi_scale(plt, series[:linewidth]),
edgecolor = py_linecolor(series), edgecolor = py_linecolor(series),
extrakw... extrakw...