0

I have the Following plot:

```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()```

Which displays this : here

I want to remove borders and make something like this:here

Is it possible?

kuljot
  • 13
  • 2
  • Yes the borderless is done. If i want the values on y axis to appear in the bars itself, can it be done? – kuljot Nov 23 '20 at 19:33

1 Answers1

0

Typically, people use

plt.axis('off')

to get plots that look like this:

enter image description here

An alternative is adjusting alpha to have very faint borders

enter image description here

James_SO
  • 641
  • 3
  • 7