Freitag, 7. November 2008
Plot-Basics
x.i <- 1:10; y.i <- 1/x.i
plot( y=y.i, x=x.i, cex.axis=0.8, yaxt="n", pch=15, col="red", ylab="", xlab="x-Werte", main="Titel" )
points( y=y.i/2, x=x.i, pch=1:10, col="blue" )
abline( h=seq(0,max(y.i),0.1), col="grey", lty="dotted")
segments( y0=y.i-0.1, y1=y.i+0.1, x0=x.i, x1=x.i )
axis( side=2, at=seq(0,1,0.1), labels=seq(0,1,0.1), cex.axis=0.8, las=2 )
legend( x="topright", inset=0.02, legend=c("y1-Werte", "y2-Werte"), col=c("red","blue"), pch=c(15,1), bg="white", cex=0.8 )
text( x=x.i+0.2, y=y.i, labels=paste("n=",round(y.i,1),sep=""), cex=0.8, adj=0 )
mtext( side=3, at=x.i, line=0.5, text=paste( "x=",x.i, sep=""), cex=0.8 )
savePlot( filename="d:/myplot.png", type="png" )
Abonnieren
Kommentare zum Post (Atom)
Keine Kommentare:
Kommentar veröffentlichen