0

I have two plots side by side. I'd like to be able to put a title on each graph but I can't figure out how to do this. Here is the snippet of my code I'm trying to add it to.

import matplotlib.pyplot as plt
fig = plt.figure()
import matplotlib.pyplot as plt
fig, axes = plt.subplots(nrows=1, ncols=2, figsize=(15, 3))
axes[0].plot(X_TSNE, 'b*')
axes[1].plot(Z_TSNE, 'r*')
fig.tight_layout()
Mehrdad995
  • 45
  • 1
  • 9
redwytnblak
  • 143
  • 1
  • 1
  • 10

1 Answers1

1
axes[0].set_title('Title A')
axes[1].set_title('Title B')
hostingutilities.com
  • 8,894
  • 3
  • 41
  • 51