#create the data
library(ggplot2)
data <- data.frame(
Date = c("2000", "2002", "2003", "2006",
"2007", "2008", "2000", "2002",
"2003", "2011", "2012", "2014"),
EUR = c(1.0155, 1.0309, 1.0335, 1.0324, 1.0294, 1.0252, 1.0322,
1.0281, 1.027, 1.0128, 1.0121, 1.0115),
Company=c(rep(c(1),6),rep(c(2),6))
)
#check the data
str(data)
# convert date column to Date as it is currently a **factor**
data$Date <- as.Date(as.character(data$Date))
#basic plot
ggplot(data,aes(Date, EUR, colour=Company, group=Company)) + geom_line()+ geom_point()
As you see in the graph, the space between 2003 and 2006 is the same as between 2011 and 2012. Is there a way to display the years that are scaled correctly/ aka proportionately!?