It's not quite clear to me what you'd like to show in your plot. Perhaps a count of how many mentions there are of each PL each year? I took a stab at using data like your example data to make a plot counting how many occurrences of each PL there are by year.
The chapter introducing ggplot2 here (3 Data visualisation | R for Data Science) has lots more examples of how it can be used. I'd also suggest the sections on data transformation and making your data "tidy" format, which makes it simpler to plot.
df <-
tibble::tribble(
~row, ~PL, ~year,
1, "C", 2009L,
2, "C", 2010L,
3, "Java", 2010L,
4, "Ruby", 2010L,
5, "Ruby", 2011L,
6, "Ruby", 2011L,
7, "C", 2010L
)
# df$year_date <- as.Date(paste0(df$year, "-01-01"))
# I wasn't sure why you needed the year as a date, but this works.
library(tidyverse)
# This counts the occurrences of each PL-year combo and fills in
# zeros for the combos that didn't appear.
df_counts <-
df %>%
group_by(PL, year) %>%
tally() %>% ungroup() %>%
complete(PL,year) %>%
replace_na(list(n=0))
# This uses the transformed data, with year on x, n (count) on y,
# and each PL getting a different color.
ggplot(df_counts, aes(year, n, color=PL)) +
geom_line() +
scale_x_continuous(breaks = 2009:2011, minor_breaks = NULL)