Question: metagene: moving the legend
1
gravatar for anton.kratz
2.4 years ago by
anton.kratz50
United States, San Diego, UCSD
anton.kratz50 wrote:

Regarding the metagene package (http://www.bioconductor.org/packages/release/bioc/html/metagene.html).

Can I move the legend of the final plot to a different position?

At the moment I am using the plot command like this:

mg$plot(title = "test metagene plot")

The legend then appears on the right of the plot, which is problematic. Can I move the legend somewhere else (f.e. top or bottom)?

metagene • 445 views
ADD COMMENTlink modified 2.4 years ago by Charles Joly Beauparlant160 • written 2.4 years ago by anton.kratz50
Answer: metagene: moving the legend
4
gravatar for Charles Joly Beauparlant
2.4 years ago by
Canada
Charles Joly Beauparlant160 wrote:

Hello Anton,

The simplest way to tweak the visual representation of the metagene plot is to extract the plot with the <font face="monospace">get_plot</font> function and use standard ggplot2 functions:

mg$plot(title = "test metagene plot")
p <- mg$get_plot()
p  + ggplot2::theme(legend.position="bottom")

Cheers!

Charles.

ADD COMMENTlink written 2.4 years ago by Charles Joly Beauparlant160
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 155 users visited in the last hour