mortazavilab / PyWGCNA

PyWGCNA is a Python package designed to do Weighted Gene Correlation Network analysis (WGCNA)
https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btad415/7218311
MIT License
192 stars 46 forks source link

how to set figsize #100

Closed bsb2014 closed 1 month ago

bsb2014 commented 1 month ago

I want to set the figsize in the function module_trait_relationships_heatmap. However, I do not know what format the option can accept. Could you please give me an example (such as Figsize=20*20 )?

The plotting is not proper if few traits only. The font size of p-values and coefficient is oversized.

Can I save the Network to png/pdf rather than html?

Thanks.

bsb2014 commented 1 month ago

image

nargesr commented 1 month ago

Hi,

Please look at the API documentation regarding the format of figsize.

module_trait_relationships_heatmap(metaData, alternative='two-sided', figsize=None, show=True, file_name='module-traitRelationships')
figsize (tuple of float) – indicates the size of the plot (20, 20)

about your second question, since the network plot is an interactive plot, we couldn’t save it as PNG or pdf but I'm pretty sure you can convert it easily afterwards.

Best, Narges