Skip to content

Commit 9ba3283

Browse files
authored
Fix scaling in plots (#1259)
1 parent 79a2306 commit 9ba3283

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/introduction/train_agent.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,17 @@ fig, axs = plt.subplots(1, 3, figsize=(20, 8))
160160

161161
# np.convolve will compute the rolling mean for 100 episodes
162162

163-
axs[0].plot(np.convolve(env.return_queue, np.ones(100)))
163+
axs[0].plot(np.convolve(env.return_queue, np.ones(100)/100))
164164
axs[0].set_title("Episode Rewards")
165165
axs[0].set_xlabel("Episode")
166166
axs[0].set_ylabel("Reward")
167167

168-
axs[1].plot(np.convolve(env.length_queue, np.ones(100)))
168+
axs[1].plot(np.convolve(env.length_queue, np.ones(100)/100))
169169
axs[1].set_title("Episode Lengths")
170170
axs[1].set_xlabel("Episode")
171171
axs[1].set_ylabel("Length")
172172

173-
axs[2].plot(np.convolve(agent.training_error, np.ones(100)))
173+
axs[2].plot(np.convolve(agent.training_error, np.ones(100)/100))
174174
axs[2].set_title("Training Error")
175175
axs[2].set_xlabel("Episode")
176176
axs[2].set_ylabel("Temporal Difference")

0 commit comments

Comments
 (0)