;
at the end of your notebook cell, but it doesn't seem to supress the annoying output text when i use Plotnine (but it does obviously work for matplotlib, etc)Any ideas ?
The point is in calling draw() method with semicolon at the end.
Fully working example:
import pandas
from plotnine import *
from random import randint
# 100 random numbers
random_numbers = [randint(1, 100) for p in range(0, 100)]
# Create DataFrame
df = pd.DataFrame({'number': random_numbers})
# Draw plot
(
ggplot(df, aes(x='number')) +
geom_histogram(bins=20, na_rm=True) +
ggtitle('Histogram of random numbers') +
theme_light()
).draw();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With