There are several issues involved here. First, options in HoloViews are dependent on the plotting library backend you've selected, e.g. bokeh, matplotlib, or plotly. In your code listing, you have not yet loaded a plotting library backend, and so you won't be able to get any help with plotting options like legend_position
. Of course, you shouldn't get an error message like the AttributeError you saw, so please file an issue at https://github.com/holoviz/holoviews/issues if you can help us replicate that bogus message. I don't see any error message when I run hv.help(hv.Curve)
with no plotting backend loaded; instead I get what Sander reported, which is a short listing of the options that don't have to do with plotting and should always be available regardless of backend:
$ python
>>> import holoviews as hv
>>> hv.help(hv.Curve)
Parameters of 'Curve'
=====================
Parameters changed from their default values are marked in red.
Soft bound values are marked in cyan.
C/V= Constant/Variable, RO/RW = ReadOnly/ReadWrite, AN=Allow None
Name Value Type Bounds Mode
cdims OrderedDict() Dict V RW
datatype ['dataframe', 'dictionary', 'grid', '... List (0, None) V RW
extents (None, None, None, None) Tuple V RW
group 'Curve' String C RW
kdims [Dimension('x')] List (1, 2) V RW
label '' String C RW
vdims [Dimension('y')] List (1, None) V RW
Parameter docstrings:
=====================
cdims: The constant dimensions defined as a dictionary of Dimension:value
pairs providing additional dimension information about the object.
...
vdims: The value dimensions of the Chart, usually corresponding to a
number of dependent variables.
As you can see, none of those 7 options are helpful in this case. If you load a plotting backend, you'll get a lot more options:
>>> hv.extension("bokeh")
>>> hv.help(hv.Curve)
Curve
Online example: http://holoviews.org/reference/elements/bokeh/Curve.html
-------------
Style Options
-------------
alpha, color, hover_alpha, hover_color, hover_line_alpha, hover_line_color, line_alpha, line_cap, line_color, line_dash, line_join, line_width, muted, muted_alpha, muted_color, muted_line_alpha, muted_line_color, nonselection_alpha, nonselection_color, nonselection_line_alpha, nonselection_line_color, selection_alpha, selection_color, selection_line_alpha, selection_line_color, visible
(Consult bokeh's documentation for more information.)
------------
Plot Options
------------
The plot options are the parameters of the plotting class:
Parameters of 'CurvePlot'
=========================
Parameters changed from their default values are marked in red.
Soft bound values are marked in cyan.
C/V= Constant/Variable, RO/RW = ReadOnly/ReadWrite, AN=Allow None
Name Value Type Bounds Mode
active_tools [] List (0, None) V RW
... 57 other options...
zlim (nan, nan) Tuple V RW
Parameter docstrings:
=====================
active_tools: Allows specifying which tools are active by default. Note
that only one tool per gesture type can be active, e.g.
both 'pan' and 'box_zoom' are drag tools, so if both are
listed only the last one will be active.
... 57 other options...
zlim: User-specified z-axis range limits for the plot, as a tuple (low,high).
If specified, takes precedence over data and dimension ranges.
Here the "style" options are only listed, not documented, because they are passed directly to the underlying plotting library, and thus can't be documented here; see Bokeh in this case. The other options have docstrings, because they are implemented by HoloViews.
Even so, if you look at the output, you'll notice that legend_position
is not actually in either list. That's because legend_position
is an option not of hv.Curve
but of hv.Overlay
, a general container for overlayable things (Curves and many other objects). So you need to do hv.help
on the Overlay class:
>>> hv.help(hv.Overlay)
Overlay
Online example: http://holoviews.org/reference/containers/bokeh/Overlay.html
-------------
Style Options
-------------
background_fill_alpha, background_fill_color, border_alpha, border_color, border_hover_alpha, border_hover_color, border_hover_line_alpha, border_hover_line_color, border_line_alpha, border_line_cap, border_line_color, border_line_dash, border_line_join, border_line_width, border_muted_alpha, border_muted_color, border_muted_line_alpha, border_muted_line_color, border_nonselection_alpha, border_nonselection_color, border_nonselection_line_alpha, border_nonselection_line_color, border_selection_alpha, border_selection_color, border_selection_line_alpha, border_selection_line_color, click_policy, glyph_height, glyph_width, label_height, label_standoff, label_width, legend_padding, legend_spacing, text_align, text_alpha, text_baseline, text_color, text_font, text_font_size, text_font_style
(Consult bokeh's documentation for more information.)
------------
Plot Options
------------
The plot options are the parameters of the plotting class:
Parameters of 'OverlayPlot'
===========================
Parameters changed from their default values are marked in red.
Soft bound values are marked in cyan.
C/V= Constant/Variable, RO/RW = ReadOnly/ReadWrite, AN=Allow None
Name Value Type Bounds Mode
active_tools [] List (0, None) V RW
...66 more options...
zlim (nan, nan) Tuple V RW
Parameter docstrings:
=====================
active_tools: Allows specifying which tools are active by default.
...
legend_position: Allows selecting between a number of predefined legend position
options. The predefined options may be customized in the
legend_specs class attribute.
...
So you can see that legend_position
is an option, but after all that, it still doesn't tell you what's allowed. Frustrating! In many cases you can type part of it in Jupyter and invoke tab completion, but in this case with a string argument, your best bet is simply to supply an incorrect value. If you do that in Jupyter, you'll get a list of the allowed options:
>>> hv.Overlay().opts(hv.opts.Overlay(legend_position='aslkjf'))
ValueError: aslkjf not in Parameter legend_position's list of possible objects, valid options include [top_right, top_left, bottom_left, bottom_right, right, left, top, bottom]
Lots of info available, but it's hard to find it!