plot(1:10)
library("reticulate") matplotlib <- import("matplotlib") matplotlib$use("Agg", force = TRUE)
```{python py-plot} import matplotlib.pyplot as plt
x = range(1, 10) plt.plot(x, x)
```{python py-plot-w-fig.path, fig.path="to-be-ignored-and-generate-warning"} import matplotlib.pyplot as plt x = range(1, 10) plt.plot(x, x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.