The Many Ways To Call Axes In Matplotlib

%matplotlib widget
from IPython.display import display, HTML
import re
from pathlib import Path
import cv2
import numpy as np
import matplotlib.pyplot as plt
from pprint import pprint
import clipboard
import pandas as pd
import concurrent.futures
import time
import pickle
import platform
import sys
plt.style.use("dark_background")
# import tensorflow as tf
# print(tf.__version__)
fig = plt.figure("00")
plt.clf()
axs = fig.subplots(2, 3)
for rr in range(2):
for cc in range(3):
axs[rr, cc].plot([1, 2, 3,4])
axs[rr, cc].set_title(f"r{rr}, c{cc}")
plt.tight_layout(pad=0.2, h_pad=0.2, w_pad=0.2)
plt.show()

image

ref

The Many Ways To Call Axes In Matplotlib | by Jun | Towards Data Science
https://towardsdatascience.com/the-many-ways-to-call-axes-in-matplotlib-2667a7b06e06#:~:text=In most circumstances%2C we instantiate,function is passed with fig.

posted on   yusisc  阅读(21)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示