def test_image_src(): import gym env = gym.make('FetchReach-v1') img = env.render('rgb_array') doc.image(img, f"figures/reach.png?ts={doc.now()}") print(doc._md) doc.flush()
def test_image(): import gym env = gym.make('FetchReach-v1') env.reset() img = env.render('rgb_array') doc.image(img) print(doc._md) doc.flush()
title = "CURL on Walker-walk" plt.figure() plt.plot(step, avg.to_list(), color="#23aaff") plt.fill_between(step, bottom, top, color="#23aaff", alpha=0.15) plt.gca().xaxis.set_major_formatter( ticker.FuncFormatter(lambda x, _: f"{int(x / 1000)}k" if x else "0")) plt.title(title) plt.xlabel("Steps") plt.ylabel("Return") r.savefig(f"figures/learning_curve.png", title=title, dpi=300, zoom="20%") doc @ """ ## How Come The Figure Looks So Good? This is because we place the following file: [./matplotlibrc](./matplotlibrc) inside this folder. This file contains the following styling options: ```python """ doc @ loader.load_text("../../../matplotlibrc") """ ``` """ doc.flush()