我想要的:
我想用一个函数绘制大约8个密度(小提琴)曲线图(都在单独的图形中),但是当我运行时,我得到的要么是一个包含所有8个特征的单一绘图,要么是具有相同特征的8个不同绘图。
如何使用函数在不同的图形上绘制不同的图?在
我的当前代码:
#CODE-1
#feature: a list of 8 features that i want to visualise
#visualise_univariate_feature: a function that plots a seaborn violin plot
#this code produces 8 plots but all on the same feature from the list(the last element of the list)
for i in range(9):
plt.figure(i)
for feature in features:
display(visualise_univariate_feature(x=feature))
#CODE-2
#This code produces 1 plot with 8 features all together
for feature in features:
display(visualise_univariate_feature(x=feature))
没有明确的答案是不可能的。在
不管你怎么想
相关问题 更多 >
编程相关推荐