I have the following code:
%matplotlib notebook
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
fig, ax = plt.subplots(2,1, figsize=(10, 5))
plt.suptitle('My Data', x = 0.5, y = 1.0, fontsize = '8')
for i in range(0,2):
l1, = ax[i].plot(data_df['col_A'][101:200] , color = 'black')
l2, = ax[i].plot(data_df['col_B'][101:200], color = 'red')
plt.show()
plt.tight_layout()
And here is an output figure:
I am wondering if we could shift the entire red series to the left by 6 steps?
(I tried:
l2, = ax[i].plot(data_df_new['createvm_duration'][101-6:200-6], color = 'red')
which is not what I want because I want the x-axis ticks remain the same, but re-match of black and red peaks.)
Thanks!