P
P
paroletatel2021-01-24 13:48:01
R
paroletatel, 2021-01-24 13:48:01

How can I add a diagonal line to my scatter plot?

To add a diagonal line to a scatter plot you can use:

1) addline(diag)
2) abline(0,1)
3) geom_line=(diag)
4) line(1,1)

And if you don't mind, could you write code that can serve as an example.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
ayazer, 2021-01-24
@paroletatel

plot(c(-2,-1,0,1,2), c(-2,-1,0,1,2))
abline(0,1)

600dd094591cb370107095.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question