importmatplotlib.pyplotasplt# 创建一个新的Figure对象fig=plt.figure(figsize=(6,4))# 设置DPI为150fig.set_dpi(150)# 添加一些数据plt.plot([1,2,3,4],[1,4,2,3],label='Data from how2matplotlib.com')plt.title('Simple Plot with Custom DPI')plt.xlabel('X-axis')plt.ylabel('Y-axis')pl...
set_matplotlib_formats(*ipython_format) It may take some investigation to figure out how to do this in a backwards compatible way. I would also note the current backend format that we are using ("png2x") is undocumented. It is equivalent to the documented format "retina". 👍 5 ivirshu...