Displaying 1 result from an estimated 1 matches for "usgdp".
Did you mean:
sgdp
2009 Dec 02
1
polygon graph
...Imagine.
I want to plot
g<-read.table("dd.txt", col.names=c("fecha","DP"))
g$fecha <- as.Date(g$fecha, format="%d/%m/%Y")
t<-g$fecha
st<-length(g$DP)
ft<-plot(t,g$DP,type="l",ylab="DP")
polygon(c(1, 1:st, st), c(0, g$USGDP, 0), col = "blue")
abline(h = 0, lwd = 1, col = "black")
If I ommit ploygon line the doc works properly (it plots a graph line).
But I want to colur the area below or over the line and the zero axis.
Can you guide or indicate because in this case polygon doesn?t work.
I att...