pegasus.wordcloud¶
- pegasus.wordcloud(data, factor, max_words=20, random_state=0, colormap='hsv', width=800, height=400, panel_size=(6, 4), return_fig=False, dpi=300.0, **kwargs)[source]¶
Generate one word cloud image for factor (starts from 0) in data.uns[‘W’].
- Parameters
data (
AnnData
orUnimodalData
orMultimodalData
object) – The main data object.factor (
int
) – Which factor to plot. factor starts from 0.max_words (
int
, optional, default: 20) – Maximum number of genes to show in the image.random_state (
int
, optional, default: 0) – Random seed passing to WordCloud function.colormap (
str
, optional, default:hsv
) – Color map for plotting words.width (
int
, optional, default: 800) – Canvas width.height (
int
, optional, default: 400) – Canvas height.panel_size (
tuple
, optional, default: (6, 4)) – The plot size (width, height) in inches.return_fig (
bool
, optional, default:False
) – Return aFigure
object ifTrue
; returnNone
otherwise.dpi (
float
, optional, default:300.0
) – The resolution in dots per inch.
- Returns
A
matplotlib.figure.Figure
object containing the dot plot ifreturn_fig == True
- Return type
Figure object
Examples
>>> fig = pg.wordcloud(data, factor=0)