Plotly简介以及基础图形的绘制

目录

  • Plotly简介
    • 安装环境
    • 离线绘图
  • 基础图形
    • 散点图
      • 简单的散点图
      • 对散点图进行样式设置
    • 气泡图
      • 基本案例
      • 样式设置
      • 缩放设置
      • 参数解读
    • 线形图
      • 基本案例
      • 填充线形图
    • 柱状图
      • 基本柱状图
      • 柱状簇
      • 层叠柱状图
      • 图形样式设置
    • 水平条形图
      • 基本案例
      • 层叠水平条形图
    • 饼图
      • 基本案例
    • 环形图
      • 离心饼图
    • 面积图
      • 填充交叉处面积
      • 堆积面积图

最近学习了《Python数据分析 基于Plotly的动态可视化绘图》(孙洋洋等人著)一书,为了方便以后查看,还是写一下为好。
该书所有代码网址链接: link.
注册成为博文视点社区用户,可以找到该书: link.
并且可以下载实例代码和资源文件哦。

Plotly简介

  Pandas和Plotly互动式绘图模块可以称为Python数据分析和Python量化分析量大重量级模块库。Pandas是业界公认的大数据工程一线最好的解决方案;Plotly是最好的绘图工具之一。

安装环境

   安装Plotly方法:打开cmd命令,代码`pip install plotly`即可,若要升级到最新版,则代码`pip install plotly -- upgrade`
   (我使用的是Pycharm环境,在里面直接下载而不需要打开cmd命令行)

离线绘图

离线绘图功能允许在没有网络情况下绘图,并把图像保存到本地,有两种方法实现:
  1. 使用plotly.offline.plot()方法会在本地新建一个HTML文件,并可以选择是否在浏览器中打开这个文件。
  2. 使用plotly.offline.iplot()方法会在Jupyter Notebook中直接绘图,而不需要创建一个HTML文件
    在线绘图操作查看帮助:
import plotly.plotly as py
help(py.plot)
离线绘图操作查看帮助:
import plotly
help(plotly.offline.plot)

基础图形

散点图

简单的散点图

import plotly as py
import plotly.graph_objs as go
# -------pre def
pyplt=py.offline.plot
# -------code
#creaet random data with numpy
import numpy as np
N=100
random_x=np.linspace(0,1,N)
random_y0=np.random.randn(N)+5
random_y1=np.random.randn(N)
random_y2=np.random.randn(N)-5

#create traces
trace0=go.Scatter(x=random_x,y=random_y0,mode='markers',name='markers')
trace1=go.Scatter(x=random_x,y=random_y1,mode='lines',name='lines')
trace2=go.Scatter(x=random_x,y=random_y2,mode='lines+markers',name='lines+markers')
data=Data([trace0,trace1,trace2])
pyplt(data,filename='散点图.html')

print('ok') #提示已经绘制完成

结果:
Plotly简介以及基础图形的绘制_第1张图片

对散点图进行样式设置

import plotly as py
import plotly.graph_objs as go
import numpy as np
# ------pre def
pyplt=py.offline.plot
# ------code
N=500
x=np.random.randn(N)

trace0=go.Scatter(
    x=np.random.randn(N),
    y=np.random.randn(N)+2,
    name='Above',
    mode='markers+lines',
    marker=dict(
        size=10, #设置点的宽度
        color='rgba(152,0,0,0.8)', #设置点的颜色
        line=dict(
            width=2, #设置线条的宽度
            color='rgb(0,0,0)', #设置线条的颜色
        )
    )
)
trace1=go.Scatter(
    x=np.random.randn(N),
    y=np.random.randn(N)-2,
    name='Below',
    mode='markers',
    marker=dict(
        size=10, #设置点的宽度
        color='rgba(255,0,0,0.8)', #设置点的颜色
    )
)
data=[trace0,trace1]
#设置页面布局
layout=dict(title='Styled Scatter',
            yaxis=dict(zeroline=True),#显示y轴的0刻度线
            xaxis=dict(zeroline=False))#不显示x轴的0刻度线)
#布局数据
fig=dict(data=data,layout=layout)
pyplt(fig,filename='散点图2.html')

结果:
Plotly简介以及基础图形的绘制_第2张图片

气泡图

基本案例

import plotly as py
import plotly.graph_objs as go
#----pre def
pyplt=py.offline.plot
trace0=go.Scatter(
    x=[1,2,3,4],
    y=[10,11,12,13],
    mode='markers',
    marker=dict(size=[40,60,80,100])
)
data=[trace0]
pyplt(data,filename='气泡图基本案例.html')
print('ok')

结果:Plotly简介以及基础图形的绘制_第3张图片

样式设置

import plotly as py
import plotly.graph_objs as go
#----pre def
pyplt=py.offline.plot
trace0=go.Scatter(
    x=[1,2,3,4],
    y=[10,11,12,13],
    mode='markers',
    text=['A
size:40'
,'B
size:60'
,'C
size:80'
,'D
size:100'
],#
是换行的意思
marker=dict( color=[120,125,130,135], opacity=[1,0.8,0.6,0.4], size=[40,60,80,100], showscale=True #表示右边显示颜色条的大小 ) ) data=[trace0] pyplt(data,filename='气泡图样式设置.html') print('ok')

结果:
Plotly简介以及基础图形的绘制_第4张图片

缩放设置

import plotly as py
import plotly.graph_objs as go
#----pre def
pyplt=py.offline.plot
trace0=go.Scatter(x=[1,2,3,4],y=[10,11,12,13],
                  text=['A
size:40
default'
,'B
size:60
default'
,'C
size:80
default'
,'D
size:100
default'
], mode='markers', name='default', marker=dict(size=[400,600,800,1000],sizemode='area') ) trace1=go.Scatter(x=[1,2,3,4],y=[14,15,16,17], text=['A
size:40
sizeref:0.2'
,'B
size:60
sizeref:0.2'
,'C
size:80
sizeref:0.2'
,'D
size:100
sizeref:0.2'
], mode='markers', name='sizeref:0.2',#变成默认的5倍 marker=dict(size=[400,600,800,1000],sizeref=0.2,sizemode='area') ) trace2=go.Scatter(x=[1,2,3,4],y=[20,21,22,23], text=['A
size:40
sizeref:2'
,'B
size:60
sizeref:2'
,'C
size:80
sizeref:2'
,'D
size:100
sizeref:2'
], mode='markers', name='sizeref:2',#变成默认的1/2倍 marker=dict(size=[400,600,800,1000],sizeref=2,sizemode='area') ) data=[trace0,trace1,trace2] pyplt(data,filename='气泡图缩放设置.html') print('ok')

结果:
Plotly简介以及基础图形的绘制_第5张图片

参数解读

1.text:列表,为相应节点的悬浮文字内容
2.marker:数据节点参数
(1)size:尺寸大小
(2)sizeref:缩放比例。如设置为2,则变成原来的1/2
(3)sizemode:diamante以直径缩放,area以面积缩放
(4)color:颜色
(5)showscale:True为显示颜色条
(6)opacity:0~1之间的数,表示相应节点的透明度

线形图

基本案例

import plotly as py
import plotly.graph_objs as go
import pandas
# Basic Line
pyplt = py.offline.plot
# 600000浦发银行20170301-20170428涨跌幅度数据,数据来源Wind
profit_rate = [-0.001, -0.013, -0.004, 0.002, 0.003, -0.001, -0.009, 0.0, 0.007,\
    -0.005, 0.0, 0.001, -0.006, -0.006, -0.009, -0.013, 0.005, 0.007,\
    0.004, -0.006, -0.009, -0.004, 0.015, 0.007, 0.001, 0.003, -0.009,\
    -0.005, 0.001, -0.008, -0.016, 0.002, -0.013, -0.009, -0.014, 0.009,\
    -0.003, 0.002, -0.001, 0.011, 0.004]
date = pd.bdate_range(start = '3/1/2017', end = '4/30/2017') 
trace = [go.Scatter(
    x = date,
    y = profit_rate
)]
layout = dict(
    title = '浦发银行20170301-20170428涨跌幅变化',
    xaxis = dict(title = 'Date'),
    yaxis = dict(title = 'profit_rate')
)

fig = dict(data = trace, layout = layout)
pyplt(fig,filename='tmp/basic-line.html')
print('ok')

结果:
Plotly简介以及基础图形的绘制_第6张图片

填充线形图

import plotly as py
import plotly.graph_objs as go
pyplt=py.offline.plot
x=[1,2,3,4,5,6,7,8,9,10]
x_rev=x[::-1] #逆序

# Line 1 002104恒宝股份20170518-20170602
y1 = [8.86, 8.85, 8.69, 8.4, 8.62, 9, 8.99, 8.85, 8.59, 9.31]
y1_upper = [9.05, 9.03, 9.08, 8.76, 8.63, 9.04, 9.09, 9.16, 8.9, 9.45]
y1_lower = [8.86, 8.85, 8.64, 8.36, 8.33, 8.43, 8.93, 8.84, 8.53, 8.52]
y1_lower = y1_lower[::-1] # 逆序

# Line 2 002125湘潭电化20170518-20170602
y2 = [10.39, 10.35, 9.85, 9.73, 9.77, 9.8, 9.75, 9.65, 9.16, 9.34]
y2_upper = [10.58, 10.52, 10.34, 10.14, 9.87, 9.87, 9.94, 9.6, 9.42, 9.5]
y2_lower = [10.15, 10.21, 9.72, 9.68, 9.24, 9.48, 9.62, 9.12, 9.12, 9.34]
y2_lower = y2_lower[::-1]

# Line 3 002077大港股份20170518-20170602
y3 = [11.88, 13.07, 12.75, 12.02, 12.1, 12.61, 12.42, 12.42, 11.18, 10.72]
y3_upper = [11.98, 13.07, 13.4, 12.91, 12.45, 13.1, 12.61, 12.65, 12.45, 11.16]
y3_lower = [11.6, 11.75, 12.75, 12.02, 11.8, 11.92, 12.17, 12.29, 11.18, 10.35]
y3_lower = y3_lower[::-1]
#接下来绘制填充部分的线
trace1=go.Scatter(
    x=x+x_rev,
    y=y1_upper+y1_lower,#它们是在合并列表
    fill='tozerox',
    fillcolor='rgba(0,0,205,0.2)',
    line=go.Line(color='white'),
    showlegend=False,
    name='恒宝股份'
)
trace2=go.Scatter(
    x=x+x_rev,
    y=y2_upper+y2_lower,#它们是在合并列表
    fill='tozerox',
    fillcolor='rgba(30,144,255,0.2)',
    line=go.Line(color='white'),
    showlegend=False,
    name='湘潭电化'
)
trace3=go.Scatter(
    x=x+x_rev,
    y=y3_upper+y3_lower,#它们是在合并列表
    fill='tozerox',
    fillcolor='rgba(112,128,144,0.2)',
    line=go.Line(color='white'),
    showlegend=False,
    name='大港股份'
)
#绘制三条线
trace4 = go.Scatter(
    x = x,
    y = y1,
    line = go.Line(color = 'rgb(0,0,205)'),
    mode = 'lines',
    name = '恒宝股份',
)
trace5 = go.Scatter(
    x = x,
    y = y2,
    line = go.Line(color='rgb(30,144,255)'),
    mode = 'lines',
    name = '湘潭电化',
)
trace6 = go.Scatter(
    x = x,
    y = y3,
    line = go.Line(color='rgb(112,128,144)'),
    mode = 'lines',
    name = '大港股份',
)

data = go.Data([trace1, trace2, trace3, trace4, trace5, trace6])

layout = go.Layout(
    paper_bgcolor = 'rgb(255,255,255)',
    plot_bgcolor = 'rgb(229,229,229)',
    xaxis = go.XAxis(
        gridcolor = 'rgb(255,255,255)',
        range = [1,10],
        showgrid = True,
        showline = False,
        showticklabels = True,
        tickcolor = 'rgb(127,127,127)',
        ticks = 'outside',
        zeroline = False
    ),
    yaxis = go.YAxis(
        gridcolor = 'rgb(255,255,255)',
        showgrid = True,
        showline = False,
        showticklabels = True,
        tickcolor = 'rgb(127,127,127)',
        ticks = 'outside',
        zeroline = False
    ),
)
fig = go.Figure(data = data, layout = layout)
pyplt(fig, filename = '填充线形图.html')
print('ok')

结果:
Plotly简介以及基础图形的绘制_第7张图片

柱状图

基本柱状图

import plotly as py
import plotly.graph_objs as go
pyplt=py.offline.plot
#数据
trace0=go.Bar(x=[1,2,3,4,5],y=[1,2,3,4,5])
#布局
layout_basic=go.Layout(title='the title',xaxis=go.layout.XAxis(range=[-0.5,4.5],domain=[0,1]))

figure=go.Figure(data=trace0,layout=layout_basic)
pyplt(figure,filename='基本柱状图.html')
print('ok')

结果:
Plotly简介以及基础图形的绘制_第8张图片

柱状簇

import plotly as py
import plotly.graph_objs as go
pyplt=py.offline.plot
trace_1 = go.Bar(
            x = ["上海物贸", "广东明珠", "五矿发展"],
            y = [4.12, 5.32, 0.60],
            name = "201609"
    )

trace_2 = go.Bar(
            x = ["上海物贸", "广东明珠", "五矿发展"],
            y = [3.65, 6.14, 0.58],
            name = "201612"
    )

trace_3 = go.Bar(
            x = ["上海物贸", "广东明珠", "五矿发展"],
            y = [2.15, 1.35, 0.19],
            name = "201703"
    )

trace = [trace_1, trace_2, trace_3]

# Layout
layout = go.Layout(
            title = '国际贸易板块净资产收益率对比图'
    )

# Figure
figure = go.Figure(data = trace, layout = layout)

# Plot
pyplt(figure, filename='柱状簇.html')

结果:
Plotly简介以及基础图形的绘制_第9张图片

层叠柱状图

import plotly as py
import plotly.graph_objs as go
pyplt = py.offline.plot

# Stacked Bar Chart
trace_1 = go.Bar(
    x = ['华夏新经济混合', '华夏上证50', '嘉实新机遇混合', '南方消费活力混合','华泰柏瑞'],
    y = [0.7252, 0.9912, 0.5347, 0.4436, 0.9911],
    name = '股票投资'
)

trace_2 = go.Bar(
    x = ['华夏新经济混合', '华夏上证50', '嘉实新机遇混合', '南方消费活力混合','华泰柏瑞'],
    y = [0.2072, 0, 0.4081, 0.4955, 0.02],
    name='其它投资'
)

trace_3 = go.Bar(
    x = ['华夏新经济混合', '华夏上证50', '嘉实新机遇混合', '南方消费活力混合','华泰柏瑞'],
    y = [0, 0, 0.037, 0, 0],
    name='债券投资'
)

trace_4 = go.Bar(
    x = ['华夏新经济混合', '华夏上证50', '嘉实新机遇混合', '南方消费活力混合','华泰柏瑞'],
    y = [0.0676, 0.0087, 0.0202, 0.0609, 0.0087],
    name='银行存款'
)

trace = [trace_1, trace_2, trace_3, trace_4]
layout = go.Layout(
    title = '基金资产配置比例图',
    barmode='stack'  #选择了层叠模式
)

fig = go.Figure(data = trace, layout = layout)
pyplt(fig, filename='层叠柱状图.html')

结果:Plotly简介以及基础图形的绘制_第10张图片

图形样式设置

import plotly as py
import plotly.graph_objs as go
pyplt = py.offline.plot

volume=[0.49,0.71,1.43,1.4,0.93]
width=[each*3/sum(volume) for each in volume]
trace0=go.Bar(x=['AU.SHF','AG.SHF','SN.SHF','PB.SHF','CU.SHF'],y=[0.85,0.13,-0.93,0.46,0.06],
              width=width,marker=dict(color=['rgb(205,38,38)','rgb(205,38,38)','rgb(34,139,34)','rgb(205,38,38)','rgb(205,38,38)'],
                                      line=dict(color='rgb(0,0,0)',width=1.5)),opacity=0.8)
data=[trace0]
layout=go.Layout(title='有色金属板块',xaxis=dict(tickangle=-45))
fig=go.Figure(data=data,layout=layout)
pyplt(fig,filename='柱状图样式设置')
print('ok')

结果:
Plotly简介以及基础图形的绘制_第11张图片

水平条形图

基本案例

#之前做层叠的柱状图,只需要表明样式为stack,这里只要指明方向
import plotly as py
import plotly.graph_objs as go
pyplt = py.offline.plot

data=go.Bar(x=[29.4,34.62,30.16],y=['万科','欧农科技','世纪星源'],
            orientation='h')
layout=go.Layout(title='净资产')
figure=go.Figure(data=data,layout=layout)
pyplt(figure,filename='水平条形图基本案例.html')

结果:
Plotly简介以及基础图形的绘制_第12张图片

层叠水平条形图

import plotly as py
import plotly.graph_objs as go
from plotly import tools
# Colored Horizontal Bar Chart
pyplt = py.offline.plot
trace1 = go.Bar(
    y = ['CU.SHF', 'AG.SHF', 'AU.SHF'],
    x = [21258, 30279, 8056],
    name = '中信期货',
    orientation = 'h',
    marker = dict(
        color = '#104E8B',
        line = dict(
            color = '#104E8B',
            width = 3)
    )
)
trace2 = go.Bar(
    y = ['CU.SHF', 'AG.SHF', 'AU.SHF'],
    x = [19853, 9375, 4063],
    name = '永安期货',
    orientation = 'h',
    marker = dict(
        color = '#1874CD',
        line = dict(
            color = '#104E8B',
            width = 3)
    )
)
trace3 = go.Bar(
    y = ['CU.SHF', 'AG.SHF', 'AU.SHF'],
    x = [4959, 13018, 8731],
    name = '海通期货',
    orientation = 'h',
    marker = dict(
        color = '#1C86EE',
        line = dict(
            color = '#104E8B',
            width = 3)
    )
)

data = [trace1, trace2,trace3]
layout = go.Layout(
    title = '贵金属期货持仓量对比图',
    barmode='stack'  #层叠
)

fig = go.Figure(data=data, layout=layout)
pyplt(fig, filename='水平层叠条形图.html')

结果:
Plotly简介以及基础图形的绘制_第13张图片

饼图

基本案例

需要使用Pie 函数,最常用的属性 values用于赋给需要的可视化数据;另一个 labels,表示不同数据对应的标签。
import plotly as py
import plotly.graph_objs as go
pyplt = py.offline.plot
labels=['股票','债券','现金','衍生品','其他']
values=[33.7,20.33,9.9,8.6,27.47]
trace0=go.Pie(labels=labels,values=values)
layout=go.Layout(title='资金配置')
fig=go.Figure(data=trace0,layout=layout)
pyplt(fig,filename='饼图基本案例.html')
print('ok')

结果:
Plotly简介以及基础图形的绘制_第14张图片

环形图

绘制环形图,只需要Pie函数设置控制环形中心空白大小的hole属性即可,而hoverinfo属性用于控制当用户将鼠标放到环形图时显示的内容,设置为‘label+percent’表示标签加数据所占的比例。
import plotly as py
import plotly.graph_objs as go
pyplt = py.offline.plot
labels=['完成','未完成']
values=[0.7,0.3]
trace=go.Pie(labels=labels,values=values,hole=0.7,hoverinfo="label+percent")
layout=go.Layout(title='工作进度图')
figure=go.Figure(data=trace,layout=layout)
pyplt(figure,filename='环形饼图.html')
print('ok')

结果:
Plotly简介以及基础图形的绘制_第15张图片

离心饼图

import plotly as py
import plotly.graph_objs as go
pyplt = py.offline.plot
labels = ['上海国际集团有限公司', '中国移动通信集团',\
 '富德生命人寿-传统', '富德生命人寿-资本金', '上海上国投资产管理有限公司']
values = [4222533311, 4103763711, 2138028672, 1356332558, 1073516173]
colors = ['#104E8B', '#1874CD', '#1C86EE', '#6495ED']

trace = [go.Pie(labels = labels,
                values = values,
                rotation = 30,
                opacity = 1,
                showlegend = False,
                pull = [0.1,0,0,0,0],
                hoverinfo = 'label+percent',
                textinfo = 'percent', # textinfo = 'value',
                textfont = dict(size = 30, color = 'white'),
                marker = dict(colors = colors,
                    line = dict(color = '#000000', width = 2)))]
fig = go.Figure(data = trace)
pyplt(trace, filename='离心饼图.html')

结果:Plotly简介以及基础图形的绘制_第16张图片

面积图

import plotly as py
import plotly.graph_objs as go
pyplt = py.offline.plot
import numpy as np

#随机生成100个交易日的收益率
s1=np.random.RandomState(8)#生成局部种子
s2=np.random.RandomState(9)#生成局部种子
rd1=s1.rand(100)/10-0.02 #挑选100个数
rd2=s2.rand(100)/10-0.02

#设定初始资金
initial1=100000
initial2=100000
total1=[]
total2=[]

for i in range(len(rd1)):
    initial1 = initial1*rd1[i] + initial1
    initial2 = initial2*rd2[i] + initial2
    total1.append(initial1)
    total2.append(initial2)
    
trace1=go.Scatter(
    y=total1,fill='tonexty',   #填充到下一条曲线
    mode='none',#无边界线
    name="策略1"
)
trace2=go.Scatter(
    y=total2,fill='tozeroy', #填充到y=0
    mode='none',#无边界线
    name="策略2"
)
data=[trace1,trace2]
layout=dict(title='策略净值线',xaxis=dict(title='交易天数'),yaxis=dict(title='净值'))

fig=dict(data=data,layout=layout)
pyplt(fig,filename='基本面积图.html')
print('ok')

结果:
Plotly简介以及基础图形的绘制_第17张图片

填充交叉处面积

import plotly as py
import plotly.graph_objs as go
pyplt = py.offline.plot
import numpy as np

#随机生成100个交易日的收益率
s1=np.random.RandomState(8)#生成局部种子
s2=np.random.RandomState(9)#生成局部种子
rd1=s1.rand(100)/10-0.02 #挑选100个数
rd2=s2.rand(100)/10-0.02

#设定初始资金
initial1=100000
initial2=100000
total1=[]
total2=[]

for i in range(len(rd1)):
    initial1 = initial1*rd1[i] + initial1
    initial2 = initial2*rd2[i] + initial2
    total1.append(initial1)
    total2.append(initial2)

trace1=go.Scatter(
    y=total1,fill='none',   #填充到下一条曲线
    mode='lines',#无边界线
    name="策略1"
)
trace2=go.Scatter(
    y=total2,fill='tonexty', #填充到y=0
    mode='lines',#无边界线
    name="策略2"
)
data=[trace1,trace2]
layout=dict(title='策略净值线',xaxis=dict(title='交易天数'),yaxis=dict(title='净值'))

fig=dict(data=data,layout=layout)
pyplt(fig,filename='交叉处填充面积图.html')
print('ok')

结果:
Plotly简介以及基础图形的绘制_第18张图片

堆积面积图

# 2.9-3 应用案例
import plotly as py
import plotly.graph_objs as go
pyplt = py.offline.plot
# Data
data_1 = go.Scatter(
    x = ['基金1', '基金2', '基金3', '基金4','基金5'],
    y = [32.52, 43.12, 43.47, 44.36, 33.11],
    name = '股票投资',
    mode = 'lines',
    line = dict(width=0.5,
              color = 'rgb(184, 247, 212)'),
    fill = 'tonexty'
)

data_2 = go.Scatter(
    x = ['基金1', '基金2', '基金3', '基金4','基金5'],
    y = [63.24, 54.33, 74.28, 63.91, 63.11],
    name = '其它投资',
    mode = 'lines',
    line = dict(width=0.5,
              color = 'rgb(111, 231, 219)'),
    fill = 'tonexty'
)

data_3 = go.Scatter(
    x = ['基金1', '基金2', '基金3', '基金4','基金5'],
    y = [83.24, 74.33, 93.91, 79.22, 83.11],
    name='债券投资',
    mode='lines',
    line=dict(width=0.5,
              color='rgb(127, 166, 238)'),
    fill='tonexty'
)

data_4 = go.Scatter(
    x = ['基金1', '基金2', '基金3', '基金4','基金5'],
    y = [100, 100, 100, 100, 100],
    name='银行存款',
    mode='lines',
    line=dict(width=0.5,
              color='rgb(131, 90, 241)'),
    fill='tonexty'
)

data = [data_1, data_2, data_3, data_4]

# Layout
layout = go.Layout(
    title = '基金资产配置比例图',
    showlegend = True,
    xaxis = dict(
        type = 'category',
    ),
    yaxis = dict(
        type = 'linear',
        range = [1, 100],
        dtick = 20,#间隔20
        ticksuffix = '%'#后缀符号%
    )
)

# Figure
fig = go.Figure(data = data, layout = layout)
pyplt(fig, filename = '堆积面积图.html')

结果:
Plotly简介以及基础图形的绘制_第19张图片
注:如果以上的图形不能满足需求,则可以登录网站查找:链接: link.

你可能感兴趣的:(学习python数据可视化,python,数据分析,数据可视化,可视化)