Loading

摘要: bbox_to_anchor参数 可以通过bbox_to_anchor参数将图例放置在坐标系外。bbox表示容纳图例的边界框-bounding box plt.legend(bbox_to_anchor=(x0, y0, width, height), loc=) width和 height是图例框 阅读全文
posted @ 2023-02-22 16:50 JinX-Digital 阅读(1521) 评论(0) 推荐(0) 编辑
摘要: 转载自:https://www.cnblogs.com/atanisi/p/8530693.html 1. 绘制双y轴:twinx(), 双x轴:twiny() # -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot a 阅读全文
posted @ 2023-02-22 16:11 JinX-Digital 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 由于直接使用reportlab绘制图表不是很方便,于是想到用matplotlib画图,将SVG嵌入PDF的方法。 需要用到svglib这个库,可以用pip install svglib安装 一个完整的例子: from io import BytesIO import matplotlib.pyplo 阅读全文
posted @ 2023-02-22 14:53 JinX-Digital 阅读(365) 评论(0) 推荐(0) 编辑