zellerlab / siamcat

R package for Statistical Inference of Associations between Microbial Communities And host phenoType
https://siamcat.embl.de/
51 stars 16 forks source link

finetuning the association and model evaluation plot #40

Open mcfmulders opened 1 year ago

mcfmulders commented 1 year ago

Hi! Thanks for the excellent package.

I was wondering if it would be possible to be able to save my association plot and model evaluation plot in a wider format. I am using siamcat for pathway data with quite large names. For the model evaluation plot some parts of the names of the pathways are cut off and the association plot doesn't even show the names of the pathways. Is there a way to finetune the width and or height of these plots? Thanks in advance.

Merijn

jakob-wirbel commented 1 year ago

Hi @mcfmulders sorry for the longer delay! By default, the plot is rendered to a DIN-A4 format pdf document. But alternatively, you can generate the plot to your device (which can be another pdf document), if you don't supply a filename in the function. It will prompt you if you are sure, since too small plot dimensions might result in a broken plot, but you can also turn off this prompt:

pdf('./test.pdf', width=20, height=10)
association.plot(sc.obj, prompt=FALSE, fn.plot=NULL)
dev.off()

Hope this still helps! Jakob