Re: [R] add segments from other data ggplot

2016-08-15 Thread PIKAL Petr
problems. But I keep your solution for future. Thanks again Petr > -Original Message- > From: Crump, Ron [mailto:r.e.cr...@warwick.ac.uk] > Sent: Monday, August 15, 2016 12:57 PM > To: PIKAL Petr > Cc: r-help@r-project.org > Subject: Re: [R] add segments from other da

Re: [R] add segments from other data ggplot

2016-08-15 Thread Crump, Ron
Dear Petr, In your code: p<-ggplot(ram.ag, aes(Raman, XRD, colour=mereni)) p+geom_point(size=5)+geom_segment(data=dat, aes(x=Ramanpuv, y=XRDpuv,xend=Ramannov, yend=XRDnov), arrow = arrow(length = unit(1,"cm"))) you have set mereni to control the colour aesthetic in the call to ggplot. This will

[R] add segments from other data ggplot

2016-08-15 Thread PIKAL Petr
Dear all I want to put arrows from other data to ggplot and get strange behaviour. The code: p<-ggplot(ram.ag, aes(Raman, XRD, colour=mereni)) p+geom_point(size=5)+geom_segment(data=dat, aes(x=Ramanpuv, y=XRDpuv,xend=Ramannov, yend=XRDnov), arrow = arrow(length = unit(1,"cm"))) results to foll