In a rmarkdown document, I use python chunk to display the plot by python code. The python code works but no figure displays, even I knit a html document.
Here is my r code
library(reticulate)
use_condaenv("base")
Here is my python code
import pandas as pd
import matplotlib.pyplot as plt
df=pd.DataFrame([[1, 2], [3, 4], [4, 3], [2, 3]])
fig = plt.figure(figsize=(14,8))
for i in df.columns:
ax=plt.subplot(2,1,i+1)
df[[i]].plot(ax=ax)
print(i)
plt.show()