how to plot multiple RLEs on same plot?
1
0
Entering edit mode
@xiaofeiwang18266-13498
Last seen 16 months ago
Singapore

Dear community,

How to use plotRLE() to plot multiple figures on same page and also only one legend, one x-axis and y-axis title, like this

enter image description here

I can use the codes below to put them in same plot, but not condensed as above.

par(mfrow = c(3,1))
plotRLE(data_ruv, outline=FALSE, col= rle_col, main="RUV_sizefactor", names=NULL, ylim=c(-4, 4))
plotRLE(data_nsolver_ori, outline=FALSE, col= rle_col, main="nsolver_ori", names=NULL, ylim=c(-4, 4))

enter image description here

plotRLE Nanostring RUVSeq DESEQ2 • 2.1k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 3 days ago
United States

Where did that first plot come from? The code used to make that may be available.

Anyway, making a plot like that is, in my experience, an iterative process that requires liberal use of the par help page. You could for instance try adjusting par()$mar. For example

> par(mfrow = c(3,1), mar = par()$mar - c(3,0,3,0))
> plot(1:10)
> plot(1:10)
> plot(1:10)

Is closer to what you want. But then you need space at the bottom for the legend, if you want one, and you need to read ?legend to see the placement arguments, etc.

ADD COMMENT
0
Entering edit mode

@James W. MacDonald Thank you so much for your time and answer!

It is much more condensed by adjusting the margin. But, I remembered it should be adjusted or managed by ggplot to put multiple figures on same page using same x-axis and y-axis. I can't remember where is the thread to discuss about that. I will try to search more.

Where did that first plot come from? The code used to make that may be available.

Here is where it comes from https://github.com/bhattacharya-a-bt/CBCS_normalization/blob/master/CBCS_normalization_tutorial.pdf

I did't find the code to generate it.

ADD REPLY
0
Entering edit mode

Yeah, it was probably done using ggplot2. Which is not a Bioconductor package, and which has lots of other help elsewhere.

ADD REPLY
0
Entering edit mode

Thanks a lot!

ADD REPLY

Login before adding your answer.

Traffic: 490 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6