Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Graphing Histogram by Frequency rather than Density

    I want my y-axis to be frequency. Why is it that when I use the frequency code, my graph turns out like this:

    Code:
    histogram Rating, by (Outcome) freq
    Click image for larger version

Name:	Graph1.png
Views:	1
Size:	63.0 KB
ID:	1558513



    But it turns out fine when it is graphed using density as the y-axis

    Code:
    hist Rating [fweight=Frequency], by (Outcome)
    Click image for larger version

Name:	Graph2.png
Views:	1
Size:	76.8 KB
ID:	1558514



    Please help, I want "frequency" for the y-axis, not "density"!

  • #2
    Cross-posted by https://www.reddit.com/user/JessGuurrrl8/ and answered at https://www.reddit.com/r/stata/comme...y_rather_than/

    https://www.statalist.org/forums/help#crossposting explains our policy on cross-posting. Please read it (and the entire advice);

    Comment


    • #3
      Thank you for your response, I have read the FAQ policy and will implement in the future.

      Comment

      Working...
      X