from lets_plot import *
LetsPlot.setup_html()
p = ggplot() \
+ geom_blank() \
+ labs(title='*Hello*, **world**', subtitle='_Simple plot_', caption='*Powered by **lets-plot***', x='Title **X**', y='Title **Y**') \
+ ggsize(400, 200)
p
p + theme(title=element_markdown())
p + theme(
title=element_markdown(),
axis_title=element_markdown(color='red'),
plot_caption=element_markdown(color='blue', size=24)
)
p \
+ ggtitle('*Hello*, <span style="color:red">**world**</span>!') \
+ theme(title=element_markdown())
p \
+ ggtitle('*Hello*, <span style="color:orange">**orange**</span> and <span style="color:red">***red***</span>!') \
+ theme(title=element_markdown(color='blue'))
p = ggplot() \
+ geom_blank() \
+ ggtitle("***Markdown title*** **\\( a^2 + b^2 = c^2 \\)**") \
+ ggsize(400, 200)
gggrid([
p,
p + theme(plot_title=element_markdown())]) \
+ ggsize(800, 200)
p = ggplot() \
+ geom_blank() \
+ labs(title='*Hello*, <br/> **world**') \
+ theme(title=element_markdown()) \
+ ggsize(400, 200)
p
ggplot() + geom_label(x=0, y=0, label="*Hello*, **world**") + ggsize(400, 200)
ggplot() \
+ geom_blank() \
+ ggtitle('*Hello*, [**lets-plot**](https://lets-plot.org)!') \
+ theme(title=element_markdown()) \
+ ggsize(400, 200)
ggplot() \
+ geom_point(x=0, y=0, tooltips=layer_tooltips().line("*Hello*, [**lets-plot**](https://lets-plot.org)!")) \
+ ggsize(400, 200)