Added suggestions

Changed the interface to stride, which is a tuple. Also added aliases and a docstring in arg_desc.
This commit is contained in:
JackDevine 2017-08-16 10:18:26 +12:00
parent ad2eaf7aef
commit 177d380092
3 changed files with 6 additions and 6 deletions

View File

@ -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)",

View File

@ -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

View File

@ -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...