0

I have this histograph that shows all my numerical variables. I want to add x and y labels to each of them. Is that possible, or do I have to break them all up into tiny graphs?

dfConverted[['attack', 'defense', 'link_number', 'pendulum_left', 'pendulum_right', 'stars']].hist(bins=50, figsize=(20,15))
plt.show()

resulting graph

Alex Waygood
  • 6,304
  • 3
  • 24
  • 46
Majin Venix
  • 15
  • 1
  • 3

1 Answers1

0

The hist method will return a list of axes that you can loop through and update.

axes = dfConverted[['attack', 'defense', 'link_number', 'pendulum_left', 'pendulum_right', 'stars']].hist(bins=50, figsize=(20,15)) 
for ax in axes[0]:
  ax.set_xlabel('x')
  ax.set_ylabel('y')
plt.show()
Mohammad
  • 3,276
  • 2
  • 19
  • 35