[R] how do I add text lables on QQ plot

Ana Marija @okov|c@@n@m@r|j@ @end|ng |rom gm@||@com
Thu Mar 12 19:39:00 CET 2020


Thank you!

On Thu, Mar 12, 2020 at 12:47 PM Abby Spurdle <spurdle.a using gmail.com> wrote:
>
> The plotting character is determined by the pch argument.
> i.e. You need to specify the pch argument in the legend call.
>
> Here's the R code to preview the first 20 plotting characters:
>
> > plot (1:20, rep (0, 20), pch=1:20, ylim = c (-5, 5) )
> > text (1:20, rep (1, 20), 1:20)
>
> Empty circles, have a pch value of 1.
> Solid circles, have a pch value of 16.
> In general, to set the color, use the col argument.
>
> So, you could add the following to your legend call:
>
> > ..., pch=16, col = c ("red", "blue"), ...
>
> And remove the fill argument.
>
>
>
> On 3/13/20, Ana Marija <sokovic.anamarija using gmail.com> wrote:
> > I could make legend via this:
> > qq(fdr2_sorted$FDR.q.val2, main = "RG_All", pch = 16,
> > col=fdr1_sorted$group, cex = 0.8, las = 1)
> > legend('topleft', legend = c('up-regulated', 'down-regulated'), fill =
> > c('red', 'blue'),bty="o")
> >
> > but this gives me squares in legend. How do I write this code in order
> > to have circles in the legend?
> >
> > On Thu, Mar 12, 2020 at 11:04 AM Ana Marija <sokovic.anamarija using gmail.com>
> > wrote:
> >>
> >> Also how would I add legend to this plot?
> >>
> >> I searched qqman pages and there is no mention of that



More information about the R-help mailing list