diff --git a/src/arg_desc.jl b/src/arg_desc.jl index f244ff99..b7af05d9 100644 --- a/src/arg_desc.jl +++ b/src/arg_desc.jl @@ -48,6 +48,7 @@ const _arg_desc = KW( :series_annotations => "AbstractVector of String or PlotText. These are annotations which are mapped to data points/positions.", :primary => "Bool. Does this count as a 'real series'? For example, you could have a path (primary), and a scatter (secondary) as 2 separate series, maybe with different data (see sticks recipe for an example). The secondary series will get the same color, etc as the primary.", :hover => "nothing or vector of strings. Text to display when hovering over each data point.", +:stride => "(1,1). Array row and column strides. Used in surface/wireframe." # plot args :plot_title => "String. Title for the whole plot (not the subplots) (Note: Not currently implemented)", diff --git a/src/args.jl b/src/args.jl index f60e782c..a72183b0 100644 --- a/src/args.jl +++ b/src/args.jl @@ -214,8 +214,7 @@ const _series_defaults = KW( :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) :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 + :stride, => (1,1), # array stride for wireframe/surface, the first element is the row stride and the second is the column stride. ) @@ -471,6 +470,7 @@ add_aliases(:series_annotations, :series_ann, :seriesann, :series_anns, :seriesa add_aliases(:html_output_format, :format, :fmt, :html_format) add_aliases(:orientation, :direction, :dir) add_aliases(:inset_subplots, :inset, :floating) +add_aliases(:stride, :wirefame_stride, :surface_stride, :surf_str, :str) # add all pluralized forms to the _keyAliases dict diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index ed3d5c95..ecac853a 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -31,8 +31,7 @@ const _pyplot_attr = merge_with_base_supported([ :inset_subplots, :dpi, :colorbar_title, - :rstride, - :cstride, + :stride, ]) const _pyplot_seriestype = [ :path, :steppre, :steppost, :shape, @@ -704,8 +703,8 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series) handle = ax[st == :surface ? :plot_surface : :plot_wireframe](x, y, z; label = series[:label], zorder = series[:series_plotindex], - rstride = series[:rstride], - cstride = series[:cstride], + rstride = series[:stride][1], + cstride = series[:stride][2], linewidth = py_dpi_scale(plt, series[:linewidth]), edgecolor = py_linecolor(series), extrakw...