Home > Blockchain >  xticks only applying to 1 graph
xticks only applying to 1 graph

Time:06-27

I'm trying to change the x axis for my graphs but it's only going through for one of them. My other graph has not changed at all. Here is the code:

fig, (gr0, gr1) = plt.subplots(ncols=2, constrained_layout=True, figsize = (17,7))

#gr0 
gr0.plot(data['g1'])
gr0.set_title('text 1')

#gr1
gr1.plot(data['g2'])
gr1.set_title('text 2')

plt.xticks(fontsize=8, rotation=45)

plt.show()

enter image description here

  • Related