# To use python3 in rstudio and draw graphs, you need to run the folling code prior to run python library(reticulate) matplotlib <- import("matplotlib", convert = TRUE) matplotlib$use("Agg")