df=read.csv("./sw.csv",header=FALSE) df library(ggplot2) df = read.csv('./sw.csv', header=F) names(df) <- c("date","units","price","value") df$value = as.numeric(df$value) df$date = as.Date(df$date, "%d/%m/%Y") pdf('sw.pdf', width=15, height=3) ggplot(df, aes(x=date, y=value)) + geom_bar(stat='identity', width=0.1) + theme_bw() + scale_x_date(minor_breaks=NULL,date_breaks = "1 month",limits = c(as.Date("2018-01-01"), as.Date(Sys.Date()))) #ggplot(data=df, aes(x=date, y=value)) + geom_line() #+ geom_bar() + theme_bw() #scale_x_date(minor_breaks=NULL,date_breaks = "1 month",limits = c(as.Date("2018-08-01"), as.Date("2018-09-10"))) dev.off()