[R] Multiple Lorenz curves in one diagram

David Winsemius dwinsemius at comcast.net
Wed Sep 22 21:46:56 CEST 2010


On Sep 22, 2010, at 3:32 PM, Ralf B wrote:

> Hi group,
>
> I would like to draw multiple Lorenz curves in a single plot using
> data already prepared. Here is a simple example:
>
> require("lawstat")
> lorenz.curve(c(1,2,3),c(4,5,4))

#You can get a half-assed solution by separating the two plot calls  
with:

par(new=TRUE)

> lorenz.curve(c(1,2,3),c(4,2,1), ylab="")
# But it still overwrites the annotations, and there is no switch to  
turn them off.

You can easily create a similar plot function with the legend entries  
commented out.

The lorenz.curve code can be accessed just by typing its name.

>
> This example draws two separate graphs. How can I combine them in a
> distinguishable way? I tried ?polygon without success...
>
> Ralf
>

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list