#!/usr/bin/env python # coding: utf-8 # # Option to show/hide plot messages # # The option `plot_message` allows to hide messages produced by sampling. # In[1]: from lets_plot import * # In[2]: LetsPlot.setup_html() # In[3]: d = { 'x': [it for it in range(100)] } # In[4]: p = ggplot(d) + geom_point(aes(x='x'), sampling=sampling_random(n=10, seed=42)) p # ### Using the `plot_message` parameter # In[5]: p + theme(plot_message='blank') # ### Hiding plot messages for the whole notebook # # Using the `LestPlot.set_theme(...)` function messages can be suppressed for the whole notebook. # In[6]: LetsPlot.set_theme(theme(plot_message='blank')) ggplot(d) + geom_point(aes(x='x'), sampling=sampling_random(n=10, seed=42))