【发布时间】:2021-11-27 14:50:58
【问题描述】:
我有 1 个 y 变量和数百个 X 变量,我想通过 for 循环创建散点图。我有允许我生成绘图的代码,但我也需要相应地标记 x、y 标签。我怎样才能做到这一点?任何帮助表示赞赏。
代码如下:
figures = []
for column in X_uni:
f = plt.figure(figsize=(6,6))
figures += [f] # This appends a figure f to the list of figures
ax = plt.axes()
ax.plot(X_uni[column], y_data, marker = 'o', ls='', ms = 3.0)
【问题讨论】:
标签: python for-loop matplotlib scatter-plot