Python Pygal子地块(几个数字)
我想在Python2.7上使用Pygal创建一个仪表板(同一窗口中有多个绘图),但后者没有子绘图功能, 有没有不使用bokeh或plotly的解决方案 Matplotlib示例:Python Pygal子地块(几个数字),python,matplotlib,anaconda,pygal,continuum,Python,Matplotlib,Anaconda,Pygal,Continuum,我想在Python2.7上使用Pygal创建一个仪表板(同一窗口中有多个绘图),但后者没有子绘图功能, 有没有不使用bokeh或plotly的解决方案 Matplotlib示例: fig, axes = plt.subplots(ncols=4, nrows=5, figsize=(35,20)) for ax in axes.flatten(): ax.plot([2,3,5,1]) plt.show() Pygal上有类似的东西吗?#-*-编码:utf-8-*- # -*- cod
fig, axes = plt.subplots(ncols=4, nrows=5, figsize=(35,20))
for ax in axes.flatten():
ax.plot([2,3,5,1])
plt.show()
Pygal上有类似的东西吗?#-*-编码:utf-8-*-
# -*- coding: utf-8 -*-
import pygal
list2=["A","B","C","D"]
liste_A=[10,20,30,40]
liste_B=[100,10,50,20]
html_file=open("merged.html",'w')
html_file.write("<html><head>…</head><body>"+"\n")
success_plot =pygal.Line(height=400,include_x_axis=True,label_font_size=4,title_font_size=26,x_title='semaines',y_title='taux_debit',legend_at_bottom=True,x_label_rotation=90)
success_plot.title = ('Title1')
success_plot.x_labels = list2
success_plot.add('PLOT 1', liste_A)
success_plot.add('PLOT 2', liste_B)
success_plot.render_to_file('graph1.svg')
html_file.write(" <object type=\"image/svg+xml\" data=\"graph1.svg\"></object>"+"\n")
success_plot.title = ('Title2')
success_plot.x_labels = list2
success_plot.add('PLOT 2', liste_A)
success_plot.add('PLOT 3', liste_B)
success_plot.render_to_file('graph2.svg')
html_file.write(" <object type=\"image/svg+xml\" data=\"graph2.svg\"></object>"+"\n")
html_file.write("</body></html>")
进口皮加尔
清单2=[“A”、“B”、“C”、“D”]
列表A=[10,20,30,40]
列表B=[100,10,50,20]
html_file=open(“merged.html”,“w”)
html_文件。写入(“…”+“\n”)
成功绘图=pygal.Line(高度=400,包括x轴=True,标签号=4,标题号=26,x标题号=semaines,y标题号=taux借方,底部图例号=True,x标签号=90)
success_plot.title=('Title1')
success\u plot.x\u labels=list2
成功图。添加(“图1”,列表A)
成功图。添加(“图2”,列表B)
成功\u plot.render\u到\u文件('graph1.svg')
html_文件。写入(“+”\n”)
success_plot.title=('Title2')
success\u plot.x\u labels=list2
成功图。添加(“图2”,列表A)
成功图。添加(“图3”,列表B)
成功\u plot.render\u到\u文件('graph2.svg')
html_文件。写入(“+”\n”)
html_文件。写入(“”)
请参见我刚刚更新的问题