Announcement

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

  • Pie chart with entire percentages

    Hi, I want to graph a pie chart with percentages but I need the number to be entire not with decimals. Right now I am using this command:

    graph pie Hid if com==0 & Kinh>0, over(Kinh) subtitle (Households by kin of the husband) plabel(_all percent)

    but I get the percentages with lots of decimals...


  • #2
    That's all to do with the display format. You want

    Code:
    graph pie Hid if com==0 & Kinh>0, over(Kinh) subtitle (Households by kin of the husband) plabel(_all percent, format("%3.0f"))
    If it is your call to create a pie chart, consider bar graphs or dot charts instead.

    Code:
    help graph bar
    help graph dot

    Comment


    • #3
      Amazing! Thank you!

      Comment


      • #4
        What you wanted was clear. I note that entire is often a translation of a similar word in other languages, e.g. entier, entero. Here the precise English mathematical word is integer.

        Comment

        Working...
        X