#!/usr/bin/env python # coding: utf-8 # In[1]: import pandas as pd from lets_plot import * # In[2]: LetsPlot.setup_html() # In[3]: df = pd.read_csv("https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/docs/examples/data/mpg.csv") print(df.shape) df.head() # In[4]: p = ggplot(df, aes("cty", "hwy", color="drv")) + geom_point() # In[5]: gggrid([ p + ggtitle("theme_minimal2() - the default"), p + theme_void() + ggtitle("theme_void()"), p + theme_grey() + ggtitle("theme_grey()"), p + theme_bw() + ggtitle("theme_bw()"), p + theme_light() + ggtitle("theme_light()"), p + theme_classic() + ggtitle("theme_classic()"), p + theme_minimal() + ggtitle("theme_minimal()"), ], ncol=3) # In[6]: pf = p + facet_grid(x="drv") # In[7]: gggrid([ pf + ggtitle("theme_minimal2() - the default"), pf + theme_void() + ggtitle("theme_void()"), pf + theme_grey() + ggtitle("theme_grey()"), pf + theme_bw() + ggtitle("theme_bw()"), pf + theme_light() + ggtitle("theme_light()"), pf + theme_classic() + ggtitle("theme_classic()"), pf + theme_minimal() + ggtitle("theme_minimal()"), ], ncol=1)