API Reference#
Declarative API Cheat Sheet#
Operator |
Description |
Example |
|---|---|---|
Add a plotter to main canvas. |
wb.add_layer(ColorMesh(data))
|
|
Add to the left-side of main canvas. |
wb.add_left(Numbers(data),
size=1, pad=.1,
name='left-plot')
|
|
Add a plotter to the right-side of main canvas. |
wb.add_right(Numbers(data))
|
|
Add a plotter to the top-side of main canvas. |
wb.add_top(Numbers(data))
|
|
Add a plotter to the bottom-side of main canvas. |
wb.add_bottom(Numbers(data))
|
|
Add titles to the plot. |
wb.add_title(top='Top Title', bottom='Bottom Title'
left='Left Title', right='Right Title')
|
|
Add a dendrogram to the plot, only available to ClusterBoard. |
cb.add_dendrogram("left", data)
|
|
Split the main canvas horizontally, only available to ClusterBoard. |
cb.group_cols(labels=[1, 1, 2, 2], order=[2, 1])
|
|
Split the main canvas vertically, only available to ClusterBoard. |
cb.group_rows(labels=[1, 1, 2, 2], order=[2, 1])
|
|
Split the main canvas horizontally, only available to ClusterBoard. |
cb.cut_cols([5])
|
|
Split the main canvas vertically, only available to ClusterBoard. |
cb.cut_rows([5])
|
|
Add legends to the plots. |
wb.add_legends()
|
|
Add a plotter to a chosen side of main plot. |
wb.add_canvas("right", Numbers(data))
|
|
Add white space between plot. |
wb.add_pad("right", 1)
|
|
Add white space surrounding the figure. |
wb.set_margin(1)
|
|
Render the plot. |
wb.render()
|
|
Save the plot to a file. |
wb.save("output.png", dpi=300)
|
|
|
Two canvas side by side, number will be added as white space |
(wb1 + 1 + wb2).render()
|
|
Two canvas top and bottom, number will be added as white space |
(wb1 / 1 / wb2).render()
|
High-Level Visualizations#
Heatmap Variants#
See |
|
Sized Heatmap |
|
Categorical Heatmap |
Layers Heatmap#
The mesh that draw customized elements in multi-layers |
UpSet plots#
Upset Plot |
|
Handle multiple sets |
OncoPrint#
Plotters#
Mesh#
Continuous Heatmap |
|
Categorical colors/heatmap |
|
Mesh for sized elements |
|
The mesh that draw marker shape |
|
The mesh that draw text on each cell |
Seaborn plots#
Wrapper for seaborn's barplot |
|
Wrapper for seaborn's boxplot |
|
Wrapper for seaborn's boxenplot |
|
Wrapper for seaborn's violinplot |
|
Wrapper for seaborn's pointplot |
|
Wrapper for seaborn's stripplot |
|
Wrapper for seaborn's swarmplot |
Other plots#
Area plot |
|
Arc diagram. |
|
Show numbers in bar plot |
|
Stacked Bar |
|
Two comparable bar plots with center line |
|
Sequence logo |
Text Label#
Add text labels |
|
Annotate a few rows or columns |
|
Add a title |
|
Mark groups |
|
Mark groups with fixed order |
Main Canvas#
The base class that handle all rendering process |
|
A main canvas class that can handle cluster data |
|
The factory class to handle legends |
|
A utility class to initialize a canvas with zero width |
|
A utility class to initialize a canvas with zero height |
|
A utility class to initialize a canvas with zero width and cluster data |
|
A utility class to initialize a canvas with zero height and cluster data |
Layout Engine#
The X-layout engine |
|
A class to layout multiple Cross Layouts |
Data Manipulation#
A helper class to handle data |
Render plan#
The base class for every plotter in Marsilea |
|
The container class that holds the rendering data and parameters for each axes |