0

I draw two separate histograms, but I don't know how to add the x labels and y labels and the tile separately for each graph. Here is my code:

subdata1=dataFrame.loc[:,['Column1','Column2']]
import matplotlib.pyplot as plt
fig, axs = plt.subplots(1,2, figsize=(6,4), dpi=100, sharey=False, tight_layout=True)
axs[0].hist(subdata1.Column1, density=True, bins=8) #1st graph
axs[1].hist(subdata1.Column2, density=True, bins=8) #2nd graph
Linlin
  • 1
  • 1
  • Do you mean `ax[0].set_xlabel("my xlabel")` and `ax[0].set_title("my title")`? If not, please explain into more detail what is asked for. Also, it might be helpful to add some reproducible test data for the two columns. – JohanC Sep 22 '21 at 18:01
  • thank you! that helps – Linlin Sep 22 '21 at 19:59

0 Answers0