import pandas as pd
from lets_plot import *
LetsPlot.setup_html()
df = pd.read_csv("https://raw.githubusercontent.com/JetBrains/lets-plot-docs/master/data/iris.csv")
df.head()
p = ggplot(df) + geom_point(aes('petal_length', 'petal_width', color='species'), size=5) + ggsize(600, 400)
p
To save plot as a PNG file use a filename that have "png" extension.
image_path = ggsave(p, "plot.png")
from IPython.display import Image
Image(image_path, width=600, height=400)