How to plot a graph with multiple lines based on a table of data


I am a beginner so my question is maybe really simple but I am not able to plot my data how I want to. My data looks like this.

And I would like to show lines with the x-axis being the numbers on the left (65,66,...) and y axis being the values inside the table. I would want to show each column as a different line in my graph (therefore, having 12 different lines in my case).

If someone could explain me how I can do it, I would really appreciate it.

Thank you in advance.

There are several ways to do this but we need some usable sample data. A screenshat is not very useful.

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 cut & paste the output into the message like this

structure(list(aa = c(1L, 4L, 7L, 10L, 13L), bb = c(2L, 5L, NA, 
11L, 14L), cc = c(3L, 6L, 9L, 12L, NA)), row.names = c(NA, 5L
), class = "data.frame")

You may find some useful tips here FAQ: How to do a minimal reproducible example ( reprex ) for beginners

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.