Open wmayner opened 6 years ago
I second that. Took me a few hours to figure it out.
I think it would be great to have examples within the documentation.
I agree that we should improve the docs here. We should clarify in the user guide that there is one positional argument (called spec
as you say) of which the most common form of spec
is simply the dimension name. Then we can document the less used tuple formats that are the other supported spec
arguments.
I'm finding myself a bit perplexed by the documentation system used throughout Holoviews.
For example, when I try to learn how to use
hv.Dimension
, there doesn't seem to be any information on the positional argument (which I now know should be the dimension's name). This issue is similar to #2925.help(hv.Dimension)
only documents keyword arguments (Params)hv.help(hv.Dimension)
only documents keyword argumentsspec
, which doesn't indicate that it should be the name of the dimension (I looked at the source and I see why this is the case, but it compounds the above issues)The only place where
name
is mentioned as an argument is in the user guide. This is misleading as currently written, because it suggests that thespec
positional argument is a keyword argument calledname
. It also suggests thatname
is a Param documented byhv.help(hv.Dimension)
, which isn't the case.I think non-Param arguments could be documented more clearly throughout.