title: How to create a Marimekko/Mosaic plot in ggplot2
body: <p>The Marimekko/Mosaic plot is a nice default plot when both x and y are categorical variables. What is the best way to create these using ggplot?</p>
  
  <p><img src="https://learnr.files.wordpress.com/2009/03/marimekko12.png?w=384&amp;h=323" alt="example"></p>
  
  <p>The only reference I could find was this 4yo <a href="http://learnr.wordpress.com/2009/03/29/ggplot2_marimekko_mosaic_chart/" rel="noreferrer">blog post</a> but this seems a bit outdated. Are there any better or easier implementations avaialable by now? The GGally package has a function <code>ggally_ratio</code> but this produces something quite different:</p>
  
  <p><img src="https://i.imgur.com/bHI5QpW.png" alt="ggally"></p>