how to plot multiple RLEs on same plot?
1
0
Entering edit mode
@xiaofeiwang18266-13498
Last seen 17 days 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

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))


plotRLE Nanostring RUVSeq DESEQ2 • 482 views
1
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day 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.

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.

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.

0
Entering edit mode

Thanks a lot!