Skip to content
Prev 393349 / 398500 Next

Plot a line using ggplot2

Please run your code before you send it. Your example is not reproducible.

library(ggplot2)

linedata<- data.frame(
  PointEstx = c( 1, 2 )
, PointEsty = c( 1, 1.5 )
)
# make sure we have a data frame
str(linedata)

#plot the data
ggplot(
  linedata
, aes( x = PointEstx
     , y = PointEsty
     )
) + geom_line()
On December 8, 2022 5:05:47 PM PST, "Sorkin, John" <jsorkin at som.umaryland.edu> wrote: