Re: [R] Very slow in processing the equation in the scatter plot ggplot

2013-01-21 Thread Janesh Devkota
Dear Ista, Thank you so much for the prompt reply. Yes, using the annotate instead of the geom_text definitely speed up my graph and look much better. Thanks. Best Regards, Janesh Devkota On Mon, Jan 21, 2013 at 3:46 PM, Ista Zahn wrote: > Hi, > > One problem is that you are printing the reg

Re: [R] Very slow in processing the equation in the scatter plot ggplot

2013-01-21 Thread Ista Zahn
Hi, One problem is that you are printing the regression equation multiple times. Compare: > system.time({ + p2 <- p1 + annotate(x = -0.1, y = 0.5, geom="text", label = lm_eqn(mydata), parse = TRUE) + print(p2) + }) user system elapsed 0.930 0.006 0.976 > system.time({ + p3 <- p1

[R] Very slow in processing the equation in the scatter plot ggplot

2013-01-21 Thread Janesh Devkota
Hello All, I have plotted a scatter plot in ggplot2 and added a regression line and a regression equation. But the processing is very very slow. One reason might be because I have so many data pairs. Is there any way to speed up this code ? I need to create a multiple layout as well. The code I h