散布图的“ fillcolor”属性收到无效的类型“ builtins.bool”

时间:2019-02-05 07:41:37

标签: python-3.x plotly quantmod

我正在尝试使用Quantmod和Python 3.6中的plotly创建股票价值的财务图表。我基本上已经从https://github.com/jackluo/py-quantmod/blob/master/start_here.ipynb复制了示例代码。这引发了错误。 这是我的代码:

import pandas as pd
pd.core.common.is_list_like = pd.api.types.is_list_like
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode(connected=True)
from plotly import tools
from datetime import datetime
from dateutil import parser
import quantmod as qm
import talib as ta

df = pd.read_csv('es-sample.csv', index_col=0)
df.columns = [c.strip() for c in df.columns]

ch = qm.Chart(df)

ch.add_RSI(14)
ch.plot()

这是显示的错误:

ValueError: 
    Invalid value of type 'builtins.bool' received for the 'fillcolor' property of scatter
        Received value: False

    The 'fillcolor' property is a color and may be specified as:
      - A hex string (e.g. '#ff0000')
      - An rgb/rgba string (e.g. 'rgb(255,0,0)')
      - An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
      - An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
      - A named CSS color:
            aliceblue, antiquewhite, aqua, aquamarine, azure,
            beige, bisque, black, blanchedalmond, blue,
            blueviolet, brown, burlywood, cadetblue,

我不确定该怎么做。

0 个答案:

没有答案