Reputation: 420
I am trying to overlay two plots eventually and therefore would like to customize each with different styles. However, I cannot seem to be able to use opts at all
import pandas as pd
import holoviews as hv
from holoviews import opts
hv.extension('bokeh', 'matplotlib')
hv.notebook_extension('bokeh','matplotlib')
# Declaring data
filepath = 'somefilepath+somefile.csv'
df = pd.read_csv(filepath, skipinitialspace = True, encoding = 'utf-8')
curves = hv.HoloMap({col: hv.Curve(df, 'Index', col) for col in df.columns},
kdims='Column')
curves.opts(
opts.Area(color='#fff8dc', line_width=2),
opts.Curve(color='black'))
Gives:
AttributeError: type object 'opts' has no attribute 'Area'
And this error shows up with every opts options, not only area. I can use the cell magic option but I don't know how I would apply different styles to different plots then.
Upvotes: 1
Views: 2073
Reputation: 34568
This spelling of options (instead of notebook magics) is a feature of the very latest release, you will need to update your version of Holoviews (or use the old way).
Upvotes: 1