Hello, R friends,

I'm trying to crack this nut:


Example Data.

pet    gender
dog    male
dog    female
dog    male
cat    female
cat    female
cat    male

Plot Task.

Horizontal 100% bars where 
y axis shows gender factor (male vs. female) 
and x axis shows percentage of kind of pets (dog vs. cat)
so that % dogs + % cats are stacked in 1 bar and sum up to 100% (for each gender group 1 bar).

How can this be done with ggplot2?

Thanks for any comments!

Mario

	[[alternative HTML version deleted]]

