I'm having trouble getting segments of short lengths to appear in my plot.
Assuming the following sample data:
x=c(11,22,33,44,55) y=c(15,23,33,45,57) z=strptime(20120101:20120105,'%Y%m%d')
If I had to create segments from this data, my segment for the third record does not appear if I want the line to end or the end of the line. It appears if I allow the ends of my string lend=0 .
plot(z,x,type='n') segments(as.numeric(z),x,as.numeric(z),y,lwd=5,lend=2)
If I try this:
segments(as.numeric(z),x,as.numeric(z),y,lwd=5,lend=0)
He shows a circle at 33. Is there a way to get at least a flat line that appears at 33 (hopefully in the base)?
I would use my actual data, which also does this when the range is small, for example, from 33.0005 to 33.0010, but this data is huge, and I was hoping that the solution, when they are the same, would also solve for small ranges.
ETA: If lwd=15 , the circle looks even more ridiculous.
Perhaps the segments are not suitable for this?
This is for a candlestick, so these numbers will be displayed both open and closed. I also have high and low numbers that go beyond this range and are drawn using lwd=1 in these segments.