HOME/Articles/

matplotlib example matplotlib starter (snippet)

Article Outline

Python matplotlib example 'matplotlib starter'

python matplotlib starter

Python matplotlib example: matplotlib starter

from matplotlib import pyplot as plt
from matplotlib.pyplot import figure
# %matplotlib inline --- uncomment when in jupyter notebook

ydata = rf.feature_importances_
xdata = xtick_positions = np.arange(len(tf.get_feature_names()))
xlabels = xtick_labels = tf.get_feature_names()

print(len(ydata), len(xdata), len(tf.get_feature_names()))

plt.figure(figsize=(20,8))
plt.plot(ydata)
plt.xticks(xtick_positions, xtick_labels, rotation=90);