[R] Overlapping a Plot with Dataframe
Jim Lemon
jim at bitwrit.com.au
Wed Aug 8 12:10:30 CEST 2012
On 08/07/2012 10:57 PM, mhimanshu wrote:
> Hello Everyone,
>
> I am trying to overlap a plot with a data set in the form of a data frame.
>
> Its very easy to overlap the data using "points" function. But the only
> problem I am facing is "Standard deviation bar" on the plot.
>
> data<- data.frame(
> x = c(3.00,2.00,3.80,2.40,2.00),
> error = c(0.0,0.4,1.1,0.7,0.5)
> )
>
> I tried plotrix, segments but they are making a new plot with data points n
> error bar.
> I want to Overlap this data sets on a plot with its Error bar.
>
Hi Himanshu,
Have you tried the following?
plot(data$x,ylim=c(1,5))
library(plotrix) dispersion(1:5,data$x,data$error)
and "data" is probably not the best name for your data frame.
Jim
More information about the R-help
mailing list