python - Inserting data in to matplotlib subplot Figures -
i've got csv of data , trying plot of data on same row in style:
fig = plt.figure() ax1 = fig.add_subplot(1,3,1) ax2 = fig.add_subplot(1,3,2) ax3 = fig.add_subplot(1,3,3)   how insert below data plotting sequentially on top of each other in created figures above?
mru.plot(x='time', y='r1', color='black') plt.ylabel('roll', fontsize=18) plt.xlabel('') plt.title('mru primary roll')  mru.plot(x='time', y='p1', color='black') plt.ylabel('pitch', fontsize=18) plt.xlabel('') plt.title('mru primary pitch')  mru.plot(x='time', y='t1', color='black') plt.ylabel('tilt', fontsize=18) plt.xlabel('') plt.title('mru primary tilt')      
you can specify on ax should plotted ax keyword argument in plot. example:
mru.plot(x='time', y='r1', color='black', ax=ax1)   note have use axes object rest of formatting of figure if want adjust correct subplot:
mru.plot(x='time', y='r1', color='black', ax=ax1) ax1.set_ylabel('roll', fontsize=18) ax1.set_xlabel('') ax1.set_title('mru primary roll')      
Comments
Post a Comment