Issue with plotting daily data using ggplot
Posted
by
user1723765
on Stack Overflow
See other posts from Stack Overflow
or by user1723765
Published on 2012-11-12T09:50:20Z
Indexed on
2012/11/12
11:01 UTC
Read the original article
Hit count: 245
I tried to plot daily data from 9 variables in ggplot, but the graph I get cannot handle the date variable properly. The x axis is unreadable and its impossible to read the plot. I'm guessing there's an issue with the handling of dates.
Here's the data: https://dl.dropbox.com/u/22681355/su.csv
Here's the code I've been using:
su=read.csv(file="su.csv", head=TRUE)
meltdf=melt(su)
ggplot(meltdf, aes(x=Date, y=value, colour=variable, group=variable))+geom_line()
and here's the output:
https://dl.dropbox.com/u/22681355/output.jpg
here's the same plot done in excel, why does it look completely different?
© Stack Overflow or respective owner