kevinblighe / EnhancedVolcano

Publication-ready volcano plots with enhanced colouring and labeling
399 stars 81 forks source link

Y - axis control to manage height of plot #74

Closed sid5427 closed 3 years ago

sid5427 commented 3 years ago

Hi Kevin,

Thanks for this awesome package!

Is there a simple way to manage the height of a generated plot?

Say for the example plot below - I want to only see the plot upto Y-axis = 5.0 level. Essentially streamline the plot?

prot_plot

Thanks, Sid

kevinblighe commented 3 years ago

Hi Sid, the extra white-space in your plot is related to how I set the default value of ylim, which is: ylim = c(0, max(-log10(toptable[[y]]), na.rm=TRUE) + 5)

I think that you can just change this to:

ylim = c(0, max(-log10(toptable[[y]]), na.rm=TRUE) + 1)

... or just ylim = c(0, 5)

That should work!

Kevin

roberthardt commented 1 year ago

Well apparently my installation of R does not know the toptable function, so whenever I want to adjust the axes extra white-space it gives an error:

"Error in EnhancedVolcano(data, lab = data$PG.Genes, selectLab = custom_label$PG.Genes, : object 'toptable' not found"

Best

Robert