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

2020-03-12 Thread Ana Marija
Thank you! On Thu, Mar 12, 2020 at 12:47 PM Abby Spurdle 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,

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

2020-03-12 Thread Abby Spurdle
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 pc

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

2020-03-12 Thread Abby Spurdle
Hi Ana, I've already given you an example of using the text function with vectors. I note that this thread contains a lot of duplication. I'd recommend people read the whole thread before posting. On Fri, Mar 13, 2020 at 3:42 AM Ana Marija wrote: > > Hi Michael, > > can you please send me a li

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

2020-03-12 Thread Ana Marija
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

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

2020-03-12 Thread Ana Marija
Also how would I add legend to this plot? I searched qqman pages and there is no mention of that qq(fdr2_sorted$FDR.q.val2, main = "RG_All", pch = 16, col=fdr1_sorted$group, cex = 0.8, las = 1) On Thu, Mar 12, 2020 at 9:30 AM Ana Marija wrote: > > Hi Michael, > > can you please send me a line o

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

2020-03-12 Thread Ana Marija
Hi Michael, can you please send me a line of code showing how it would be done. Thanks Ana On Thu, Mar 12, 2020 at 9:16 AM Michael Dewey wrote: > > Dear Ana > > You can specify the first three parameters to text() as vectors so it is > all done in one call. That may or may not answer your quest

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

2020-03-12 Thread Michael Dewey
Dear Ana You can specify the first three parameters to text() as vectors so it is all done in one call. That may or may not answer your question. Michael On 12/03/2020 14:08, Ana Marija wrote: HI David, thank you for getting back to me. Is there is a way for qq() to pick up text label name

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

2020-03-12 Thread Ana Marija
HI David, thank you for getting back to me. Is there is a way for qq() to pick up text label names on its own or I have to specify each one manually? like in this example: text( 2, 6, "arbitrary") this is dput for >a=head(fdr2_sorted) > dput(a) structure(list(NAME = c("GO_DNA_PACKAGING_COMPLEX"

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

2020-03-11 Thread David Winsemius
On 3/10/20 9:51 PM, Ana Marija wrote: Hello, I am making QQ plot via: library(ggman) qq(fdr2_sorted$FDR.q.val2, main = "RG_All", pch = 17, col=fdr1_sorted$group, cex = 1, las = 1) I think you may be confusing the audience. There is no qq function in the ggman package. There is however a q

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

2020-03-11 Thread Ana Marija
I don’t need to use qqman package... if someone has any other solution would be the most appreciated On Wed, 11 Mar 2020 at 20:28, John Kane wrote: > No idua how it works but the name suggests it in out of the Hadley > universe and not basic graphics. > > On Wed, 11 Mar 2020 at 21:14, Abby Spur

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

2020-03-11 Thread John Kane
No idua how it works but the name suggests it in out of the Hadley universe and not basic graphics. On Wed, 11 Mar 2020 at 21:14, Abby Spurdle wrote: > One more thing, I can't find a CRAN package named "ggman". > > On Thu, Mar 12, 2020 at 1:59 PM Abby Spurdle wrote: > > > > Ok, then. > > > > Wh

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

2020-03-11 Thread Abby Spurdle
One more thing, I can't find a CRAN package named "ggman". On Thu, Mar 12, 2020 at 1:59 PM Abby Spurdle wrote: > > Ok, then. > > What graphics system is the qq function using? > Assuming that it's using the base graphics system, look at the > graphics::text function. > > text (1:10, 1:10, LETTERS

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

2020-03-11 Thread Abby Spurdle
Ok, then. What graphics system is the qq function using? Assuming that it's using the base graphics system, look at the graphics::text function. text (1:10, 1:10, LETTERS [1:10]) If it's a different graphics system, then I don't know, but hopefully someone else will help. On Thu, Mar 12, 2020 a

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

2020-03-11 Thread Ana Marija
Thanks for getting back to me but I would need this text labels added in this particular instance On Wed, 11 Mar 2020 at 19:37, Abby Spurdle wrote: > > and I would like to get the plot like the one in attach. > > Please advise, > > This is a bad idea. > Plots should be *easy* to interpret. > > T

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

2020-03-11 Thread Abby Spurdle
> and I would like to get the plot like the one in attach. > Please advise, This is a bad idea. Plots should be *easy* to interpret. Try to keep plots relatively simple, avoiding unnecessary details. For nontrivial plots, use a caption to describe the main features of the plot. (That's where your

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

2020-03-10 Thread Ana Marija
Hello, I am making QQ plot via: library(ggman) qq(fdr2_sorted$FDR.q.val2, main = "RG_All", pch = 17, col=fdr1_sorted$group, cex = 1, las = 1) data frames used look like this: > head(fdr1_sorted) NAME GS follow link to MSigDB GS DETAILS SIZE