English (United States) subtitles

← Limiting the Axes - Data Analysis with R

Get Embed Code
6 Languages

Showing Revision 1 created 08/27/2016 by Udacity Robot.

  1. To avoid looking at all this long tail data, we
  2. can use the x limb parameter inside a q plot. This
  3. parameter takes a vector where we have the start position
  4. and the ending position of our axes. In our case, we
  5. want to examine friend counts less than 1000. Running the
  6. code, I can see that I have my plot with friend
  7. counts less than 1000. Now there is another way to create
  8. the same plot. Here I won't use the x limb parameter.
  9. Instead I'm going to add a layer. I use limits
  10. instead of x limb as the parameter inside of here since
  11. I know this adjustment is already for the x axis. That's
  12. why its called scale x continuous. There's also a counterpart for
  13. the y axis called scale y continuous. One of the neat
  14. concepts of ggplot is that you can build up your
  15. plot in layers. We're going to discuss layers later in this lesson,
  16. but for now I'm going to keep using the q plot syntax.
  17. So far we've learned how to create histograms, how to
  18. facet them, and how to adjust our axes. But up
  19. until now all of our histograms have had a default
  20. setting. We've been getting this error message for a while
  21. about the bandwidth defaulting to a range over 30. It
  22. turns out we can set the bandwidth ourselves to reveal
  23. interesting trends in the data. Let's hear what happened during
  24. Moira's investigation when she altered the bandwidth of her histogram.