我使用for循环将多个数据帧分散在同一个数据帧上pd.plot.散点图,但每次循环返回时,它都会打印一个色条。 如何在循环结束时只有一个色条?你知道吗
这是我的密码
if colormap is None: colormap='jet'
f,ax = plt.subplots()
for i, data in enumerate(wells):
data.plot.scatter(x,y, c=z, colormap=colormap, ax=ax)
ax.set_xlabel(x); ax.set_xlim(xlim)
ax.set_ylabel(y); ax.set_ylim(ylim)
ax.legend()
ax.grid()
ax.set_title(title)
这可以通过使用图并将轴添加到同一子图中来实现:
然后:
您可以根据需要添加标签和其他元素。你知道吗
相关问题 更多 >
编程相关推荐