matplotlib画图实例
记录下,matplotlib画图的例子,方便后续查询:
#-*- encoding=utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
# make data
x = [1, 1, 1]
colors = plt.get_cmap('Blues')(np.linspace(0.2, 0.7, len(x)))
# plot
fig, ax = plt.subplots(2, 2, figsize=(8, 8))
# plt.figu
原创
2022-03-11 17:33:02 ·
1695 阅读 ·
0 评论