Hello,

I have 2d data where x coordinate is not given in usual ascending
order (x1,...,x1+l; l>0), and instead in another, regular, but not
ascending or descending order (for illustration:
x1,-x1,x1+dx1,-x1-dx1,....).y is an array which corresponds to the way
x is ordered. I have noticed that giving 'plot(x,y,type='l') produces
a plot where the points are connected in a completely wrong way. It is
as the plot/lines assumes an ascending order between the succesive y
points ignoring the fact that they are not (it connects y(x1) with
y(-x1), for x1+dx). I don't know whether this could be a bug, because
maybe sorting the y coordinates appropriately and then interpolating
lines plotting is too much to ask of the plot function. But, I've felt
like sharing :-)

Additionally, 'points' function will plot the data properly.

Cheers,

TK

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to