What is the error?
Are you saying that you are getting error messages or the plot is not exactly what you want?
Can you describe the problem in more detail, post any erro or warning messages and supply some sample data? We may net to also see more of your code .
A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. Just do dput(mydata) where mydata is your data. Copy the output and paste it here.
Some general information on posting to the forum: FAQ