[R] Filled step-function?

Petr Klasterecky klaster at karlin.mff.cuni.cz
Wed May 16 11:01:39 CEST 2007


I am not sure what exactly you would like to fill up and how, but take a 
look at
and the examples given there.


Beate Kowalczyk napsal(a):
> Hello,
> 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
> ------------------------------------------------------------------------
> ------------------------------------------------------------------------
> ______________________________________________
> R-help at stat.math.ethz.ch 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.

Petr Klasterecky
Dept. of Probability and Statistics
Charles University in Prague
Czech Republic

More information about the R-help mailing list