1
我想繪圖使用陰謀離線。它很好,沒有錯誤,但我無法看到任何圖形。它加載一個空的圖!它在Jupyter筆記本的一個實例中爲我工作,但不在另一個實例中!空圖,如果我試圖在IPython陰謀策劃
代碼:
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import re
import requests
import logging
import os
import json
import sys
import bokeh
from ipywidgets import interact
from bokeh.io import push_notebook,show,output_notebook
from bokeh.plotting import figure
import cufflinks as cf
cf.set_config_file(world_readable=True,offline=False)
%matplotlib inline
import seaborn as sns
from plotly.offline import download_plotlyjs,init_notebook_mode,plot,iplot
init_notebook_mode(connected=True)
cf.go_offline()
from plotly.graph_objs import *
import plotly.plotly as py
import plotly.graph_objs as go
trace1 = go.Scatter(
x=[0, 1, 2, 3, 4, 5],
y=[1.5, 1, 1.3, 0.7, 0.8, 0.9]
)
trace2 = go.Scatter(
x=[0, 1, 2, 3, 4, 5],
y=[1, 0.5, 0.7, -1.2, 0.3, 0.4]
)
data = [trace1, trace2]
iplot(data, filename='bar-line')
結果爲空圖!
開闢了新的jupyter筆記本來試試你的代碼TP得到同樣的空圖! – Harikrishna
@Hariskrishna請添加一些關於您的操作系統,環境等信息,並嘗試通過點擊刪除/安裝或升級 –