I have the following code:
import matplotlib.pyplot as plt import numpy as np a=np.array([[0],[1],[2]], np.int32) b=np.array([[3],[4],[5]], np.int32) plt.plot(a, color = 'red', label = 'Historical data') plt.plot(b, color = 'blue', label='Predicted data') plt.legend() plt.show()
That gives me a graph of 2 lines each starting from x-axis = 0
.
How can I concatenate 'a'
and 'b'
and plot the graph such that 'b'
continues on the x-axis
where 'a'
ended?
Thanks!