Announcement

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

  • symbols on top of each other in graph - how to separate?

    I'm producing the below chart. (Note: data is made-up).

    For group C, there are 2 cases where the data values are the same number, and thus, the symbols are on top of each other, making it confusing. Is there a way to separate the symbols from each other?

    thank you.


    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte row str7 highestdegree byte(percentage lower upper mb mc md me)
    3 "Group A" 32 25 55  .  . 14  .
    4 "Group B" 41 31 51  .  . 16  .
    5 "Group C" 88 78 95 16 16 47 47
    end

    Code:
    
    twoway (rcap lower upper row, horizontal msize(medium)) (scatter row percentage, msize(medlarge))  (scatter row mb, msymbol(X) msize(medium)) (scatter row mc, msymbol(plus) msize(medium)) (scatter row md, msymbol(triangle) msize(medium)) (scatter row me, msymbol(diamond) msize(medium)), ylabel(3 "Group A" 4 "Group B" 5 "Group C", labgap(1))  xtitle({bf:Percentage}) ytitle("") aspect(.4)

    Click image for larger version

Name:	Graph.png
Views:	1
Size:	42.1 KB
ID:	1655668

  • #2
    I would consider changing to symbols are visible even when at the same position. o and + are a good combination and open or holllow symbols better for this purpose than solid or filled.

    Comment


    • #3
      Thanks! This worked well for this graph as there were a max of 2 on top of each other. I have another graph with 4 data points at one place. Is there a preferred combination for that?

      Comment


      • #4
        Offsetting is the next trick.

        Code:
        search cui, author sj
        for a link.

        Comment


        • #5
          Thank you! I will try that.

          Comment

          Working...
          X