# How to generate plot of reward and its variance?

I am new to reinforcement learning and I would like know how to generate a learning curve plot such as that shown below (taken from this blog post), that illustrates the reward (return) and its variance (shaded region). I would like to use Matplotlib or any other Python plotting framework.

Once you have the standard deviation (or variance) of the return, you can plot something like your plots using matplotlib's fill_between function.