element_markdown#
- element_markdown(color=None, family=None, face=None, size=None, angle=None, hjust=None, vjust=None, margin=None, blank=False) dict #
Specify how non-data components of the plot are drawn. This theme element draws texts with Markdown support.
- Parameters:
- colorstr
Text color.
- familystr
Font family.
- face{‘plain’, ‘italic’, ‘bold’, ‘bold_italic’}, default=’plain’
Font face.
- sizeint
Text size in px.
- anglefloat
Angle to rotate the text (in degrees).
- hjustfloat
Horizontal justification (in [0, 1]). 0 - left-justified; 1 - right-justified; 0.5 - center-justified. Can be used with values out of range, but behaviour is not specified.
- vjustfloat
Vertical justification (in [0, 1]). 0 - bottom-justified; 1 - top-justified; 0.5 - middle-justified. Can be used with values out of range, but behaviour is not specified.
- marginnumber or list of numbers
Margins around the text. The margin may be specified using a number or a list of numbers:
a number or list of one number - the same margin it applied to all four sides;
a list of two numbers - the first margin applies to the top and bottom, the second - to the left and right;
a list of three numbers - the first margin applies to the top, the second - to the right and left, the third - to the bottom;
a list of four numbers - the margins are applied to the top, right, bottom and left in that order.
It is acceptable to use None for any side; in this case, the default side value for this element will be used.
- blankbool, default=False
If True - draws nothing, and assigns no space.
- Returns:
- dict
Theme element specification.
Examples
1from lets_plot import * 2LetsPlot.setup_html() 3ggplot() + \ 4 geom_blank() + \ 5 labs( 6 title='*Hello*, **world**', 7 subtitle='_Simple plot_', 8 caption='*Powered by **lets-plot***', 9 x='Title **X**', 10 y='Title **Y**' 11 ) + \ 12 theme(title=element_markdown())