<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 1. Reproduce this figure
<img src="images/exercise_1-1.png">
Here's the data and some code to get you started.
Step1:  Solution
2. Reproduce this figure
<img src="images/exercise_2.1-bar_and_fill_between.png">
Here is some code to start with
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 10, 100)
y = np.cos(x), np.cos(x + 1), np.cos(x + 2)
names = ['Signal 1', 'Signal 2', 'Signal 3']
Explanation: 1. Reproduce this figure
<img src="images/exercise_1-1.png">
Here's the data and some code to get you started.
End of explanation
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(1)
# Generate data...
y_raw = np.random.randn(1000).cumsum() + 15
x_raw = np.linspace(0, 24, y_raw.size)
# Get averages of every 100 samples...
x_pos = x_raw.reshape(-1, 100).min(axis=1)
y_avg = y_raw.reshape(-1, 100).mean(axis=1)
y_err = y_raw.reshape(-1, 100).ptp(axis=1)
bar_width = x_pos[1] - x_pos[0]
# Make a made up future prediction with a fake confidence
x_pred = np.linspace(0, 30)
y_max_pred = y_avg[0] + y_err[0] + 2.3 * x_pred
y_min_pred = y_avg[0] - y_err[0] + 1.2 * x_pred
# Just so you don't have to guess at the colors...
barcolor, linecolor, fillcolor = 'wheat', 'salmon', 'lightblue'
# Now you're on your own!
Explanation: Solution
2. Reproduce this figure
<img src="images/exercise_2.1-bar_and_fill_between.png">
Here is some code to start with:
End of explanation
<END_TASK>