本文整理汇总了Python中matplotlib.backends.backend_agg.FigureCanvasAgg.resize方法的典型用法代码示例。如果您正苦于以下问题:Python FigureCanvasAgg.resize方法的具体用法?Python FigureCanvasAgg.resize怎么用?Python FigureCanvasAgg.resize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.backends.backend_agg.FigureCanvasAgg
的用法示例。
在下文中一共展示了FigureCanvasAgg.resize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Palette
# 需要导入模块: from matplotlib.backends.backend_agg import FigureCanvasAgg [as 别名]
# 或者: from matplotlib.backends.backend_agg.FigureCanvasAgg import resize [as 别名]
#palette = ["#556270", "#4ECDC4", "#C7F464", "#FF6B6B", "#C44D58"]
new_palette = Palette(palette)
#setup_bike_agents
agents = []
for j in journies:
if j[2] != j[-1]:
agents.append(Actor(j, new_palette))
total_time = len(pop)
for t in np.arange(0,total_time,0.05):
#setup plot object
fig = Figure()
canvas = FigureCanvas(fig)
ax = fig.add_subplot(111)
ax.set_frame_on(False)
ax.set_axis_off()
ax.axis([-700000, -694000, 7.044*pow(10,6), 6000 + 7.044*pow(10,6)])
ax.set_autoscale_on(False)
canvas.resize(3510, 2490)
for bike in agents:
bike.call(ax, t)
plot_stations(new_palette, ax)
#plot output
canvas.print_figure('new_%05d'%int(100*t), dpi=600)