作者:Apollo宫保鸡丁 | 来源:互联网 | 2023-09-14 11:53
cufflinks基于dataframe数据绘制线图(lineplot)、散点图(scatterplot)#cufflinks绘制线图(lineplot)fromchart_st
cufflinks基于dataframe数据绘制线图(line plot)、散点图(scatter plot)
# cufflinks绘制线图(line plot)
from chart_studio import plotly as py
import cufflinks as cf
import pandas as pd
import numpy as npcf.set_config_file(offline=True, theme='ggplot')N = 500
x = np.linspace(0, 1, N)
y = np.random.randn(N)
df = pd.DataFrame({'x': x, 'y': y})
df.set_index('x',inplace=True)df.iplot(kind='scatter', filename='cf_line.html')