简体   繁体   中英

Plot multiple Y variables in a scatter plot

I tried the following code

plot(start, Pinkpop_df1[3:5,])

But I get an error;

Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ

How can I plot multiple Y variables for each x variable? (start is the x variable for which I want to plot multiple y variables in the same scatterplot)

Try this:

plot(cbind(start,Pinkpop_df1[3:5,]))

There are several ways of calling plot and your tried a wrong mix of them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM