helping with plot

gdp <- read.csv("C:/Users/HINH/OneDrive/Desktop/Data Science/wd/gdp per capita.csv")
gdp
plot(gdp,
type ='b',
xlim = c(1, 2020),
ylim = c(0, 3000),
col = "darkorchid3",
xlab = "period",
ylab = "gdp per capita",
main = "GDP per capita in Vietnam from 1990 to 2020")
Could anyone help me with this code?
I am quite new to R studio.
Thank you for your help!

You don't seem to have indicated what your problem is.

Can you also make your example reproducible? We can't see what is in your csv file.

1 Like

Thank you for your reply. I will give it a try. But I am having trouble on how to upload my csv file on this page? How can I do that?

Hi Elmstedt,
When I run this code, I receive an incomplete graph (please see the attachment)
In the console monitor, there is warning message, saying that 1:


In plot.window(xlim, ylim, log = log, ...) :
graphical parameter "type" is obsolete
I would appreciate if you could help me.

Don't upload the csv, make a reprex or something similar. Read the article that I linked to. Making it easier for others to answer your question will mean that you are more likely to get an answer.

Yes, I see. I'll try to do a reprex then. Thank you very much!

This topic was automatically closed 42 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.