python - 在 matplotlib 条形图中删除框架边框
问题描述
我有以下情节:
```forest = sk.ensemble.RandomForestRegressor(n_estimators=250,random_state=0)
forest.fit(X, y)
importances = forest.feature_importances_
std = np.std([tree.feature_importances_ for tree in forest.estimators_],axis=0)
indices = np.argsort(importances)[::-1]
refclasscol=list(df.columns.values)
impor_bars = pd.DataFrame({'Features':refclasscol[0:20],'importance':importances[0:20]})
impor_bars = impor_bars.sort_values('importance',ascending=False).set_index('Features')
plt.rcParams['figure.figsize'] = (10, 5)
impor_bars.plot.bar()```
显示这个:here
我想删除边框并做这样的事情:这里
是否可以?
解决方案
推荐阅读
- c++ - 如何获取向量的每个第 N 个元素的“地址”
- python - 某种方式以相反的顺序逐行读取文本文件?
- javascript - JS 循环遍历所有不同的子元素
- python - 散景未使用所有可用空间
- javascript - 如何用按钮修改“oninput”?
- c++ - Qt 中的专辑封面艺术
- java - ResponseEntityExceptionHandler 为 401 异常返回空响应正文
- javascript - 如何自动调整文本区域的大小
- java-native-interface - 将值从方法解析到另一个方法JNI(C++)
- plugins - Lua 中用于处理 JWT 的自定义 Kong 插件