Announcement

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

  • graph pie with some of percentages

    How to display the percentages when percentage is above 20%, I know how to display all percentages
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte employeeNumFull
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    3
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2
    4
    1
    1
    4
    1
    1
    1
    1
    4
    4
    4
    1
    1
    4
    1
    1
    1
    1
    4
    4
    4
    4
    end
    graph pie ,over(employeeNumFull) plabel(_all percent) title("employeeNumFull") legend(ring(0) pos(3) col(1)) pie(3,explode)
    Last edited by Fred Lee; 31 Mar 2019, 09:44.

  • #2
    Since you already have code that is specific to the third segment of the pie, perhaps you would be able to use code applying labels to specific segments by replacing
    Code:
    ... plabel(_all percent) ...
    with
    Code:
    ... plabel(2 percent) plabel(3 percent) ...

    Comment


    • #3
      Originally posted by William Lisowski View Post
      Since you already have code that is specific to the third segment of the pie, perhaps you would be able to use code applying labels to specific segments by replacing
      Code:
      ... plabel(_all percent) ...
      with
      Code:
      ... plabel(2 percent) plabel(3 percent) ...
      Thanks,William! Your are so smart, this is an alternative way.

      Comment

      Working...
      X