Exercise: Multi-Line Plot with Random Values
Create a plot with two lines: the first one should plot x against y, and the second one should plot x against the negative of y. Don't forget to add the expected legend.
Expected:
![matplotlib expected figure](/multi_line_random_inverted.png)
Output:
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(4)
x = np.arange(20)
y = np.cumsum(np.random.randint(-10,10,(20)))
############## add code here ###############
############################################
plt.show()
Python
Setting up Python environment...
Output