I remain skeptical of the value of what you are doing, then. Anyway, don't use
a slope of one in your abline function call. The easiest way to be sure what
your plot ranges are is to define them yourself, and then defining the slope
and intercept needed for your abline call is straightforward al
Your requirement that the line go from bottom-left to top-right regardless of
the coordinates is inconsistent with a slope of 1. Are you sure that is your
requirement?
---
Jeff NewmillerThe .
Dear expert
How can we plot diagonal across (from bottom-left-hand corner to top
right-hand corner),
at any given coordinate range
For example
> plot(c(-2,3), c(-1,5), type = "n", xlab="x", ylab="y", asp = 1)
or
> plot(c(0,1000), c(0,334), type = "n", xlab="x", ylab="y", asp = 1)
I tried abline
3 matches
Mail list logo