Question: Change legend names when using plotBCV
0
gravatar for Juan
14 months ago by
Juan0
Newcastle University
Juan0 wrote:

Hi

I´m using plotBCV which has a legend included in the top-right corner of the plot. I would like to change the names in the legend because when I reduce the size of the plot to export it to pdf, the names in the legend goes out of the box. I tried using the same I did with plot but it didn´t work.

Code and error:

plotBCV(y,cex.axis=1.1,cex.lab=1.1, cex.main=1.4, main="scox-miec.raw", legend(2.5,5,legend=c("Tag","Com","Trend")))

 

Error in title(...) : parámetro gráfico inválido

Many thanks

Juan

edger plot tutorial • 291 views
ADD COMMENTlink modified 14 months ago by Gordon Smyth38k • written 14 months ago by Juan0
Answer: Change legend names when using plotBCV
1
gravatar for Aaron Lun
14 months ago by
Aaron Lun25k
Cambridge, United Kingdom
Aaron Lun25k wrote:

No, you can't change the legend names. If you want to customize the plot beyond what is allowed by the current options, it is straightforward to rip the code out of plotBCV. I mean, it's just some points for y$tagwise.dispersion; a trend line for y$trended.dispersion versus y$AveLogCPM; and a horizontal line at y$common.dispersion. (All of these values should be square-rooted if you want the BCV.) Pretty easy to do in a few lines.

ADD COMMENTlink written 14 months ago by Aaron Lun25k
Answer: Change legend names when using plotBCV
1
gravatar for Gordon Smyth
14 months ago by
Gordon Smyth38k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth38k wrote:

I suspect that you might be shrinking a graphics Window without redrawing the plot. When you reduce the size of the plotting window, you have to redraw the plot. Then the legend will stay in the box and there will be no problem.

You should not need to change the legend labels. You also should not usually need to set the cex sizes because those will reset automatically according to the Window size.

ADD COMMENTlink modified 14 months ago • written 14 months ago by Gordon Smyth38k
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: 157 users visited in the last hour