简体   繁体   中英

How to let a plot start at a certain point x instead of at x = 0

I have a line that I need to plot after another line in R such that they go over into each other. The line at the end needs to be red. How can I make sure that when I use plot(....) function for the first line and lines(....) for the second data that this second data coming from lines(....) plots at x = a instead of beginning at x = 0?

Make the values for second data from 1 to a as NA

data2[1:a] = NA

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