title: Grouping variables for bar chart in ggplot2: different x-axis for groups
body: <p>I'm trying to visualize percentages of an outcome among different groups (race/ethnicity) within an areal unit (MSSA, similar to census tract or block) within a larger areal unit (county). Here is a simplified version of what my data looks like:</p>
  <pre><code>| County |  MSSA.ID |     RE         | PctOutcome |
  |--------|----------|----------------|------------|
  | A      |    1     |     NHW        |   75.20    |
  | A      |    1     |     NHB        |   22.40    |
  | A      |    1     |     HISP       |   56.88    |
  | A      |    1     |     NHA        |   75.20    |
  | A      |    2     |     NHW        |   12.20    |
  | A      |    2     |     HISP       |   33.01    |
  | A      |    3     |     NHW        |   05.70    |
  | B      |    4     |     NHW        |   23.90    |
  | B      |    4     |     NHB        |   68.22    |
  | B      |    4     |     HISP       |   71.84    |
  | B      |    4     |     NHA        |   26.47    |
  | B      |    5     |     NHW        |   82.74    |
  | C      |    6     |     NHB        |   72.68    |
  | C      |    6     |     NHA        |   12.84    |
  | C      |    6     |     NHW        |   98.36    |
  | C      |    7     |     NHB        |   26.00    |
  | C      |    7     |     HISP       |   35.83    |
  | C      |    7     |     NHA        |   28.88    |
  </code></pre>
  <p>I am doing a bar chart with ggplot2 and wanting to group the MSSA.ID by the county in which they reside to use facet_geo to orient the counties in a way that is spatially similar to how they actually are on a map. I am able to do this, but each tile has the same x-axis, which is a spot for every MSSA.ID in the dataset. I would like it to just have the MSSA.IDs that reside in that county on the x-axis. Is this possible?</p>
  <p>Here is my code that produces the plots I want, but is not legible because the x-axis for each county is so wide.</p>
  <pre><code>data %&gt;%
    group_by(County) %&gt;%
    ggplot(aes(MSSA.ID, PctOutcome, fill = RE)) +
    geom_bar(position = &quot;stack&quot;, stat = &quot;identity&quot;) +
    facet_geo(~ county, grid = &quot;us_ca_counties_grid1&quot;)
  </code></pre>
  <p>It gives me this</p>
  <p><img src="https://i.stack.imgur.com/QvoPp.png" alt="Graph Output" /></p>
  <p>This is almost what I'm looking for, but I want to remove the MSSA.ID for MSSAs that do not reside within that county from the county tile. Any tips or recommendations or help is greatly appreciated!</p>