[R] Filled step-function?

Beate Kowalczyk beate.kowalczyk at googlemail.com
Wed May 16 10:32:59 CEST 2007


I'd like to generate a filled step-function in R as you can see in the 
attachement (image is generated by grapher, but I need a freely 
available alternative). The problem is, that I don't know, how to fill 
it up. My code right now looks like this:

pH <- c(0,6.1,6.1,6.3,6.6,7.3,0)
Tiefe <- c(0,0,10,40,80,120,10)
plot(pH,Tiefe,type="s",main="Tiefenfunktion pH",ylim=c(120,0),xlim=c(0,23))

Can someone give me an hint how to work on this?

Thanks, Beate

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pH.png
Type: image/png
Size: 11992 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20070516/dcffce22/attachment.png 

More information about the R-help mailing list