Announcement

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

  • Gender symbols in -twoway connected-

    We are using -twoway connected- to graph data for boys and girls, and it would be elegant if we could use the male and female pictographs in place of the usual filled dots.
    Is there a way to do this? Here's an example in SAS, though using a scatterplot instead of a connected plot: https://images.app.goo.gl/zNC5PZrhmDJ1Uxe59
    Last edited by paulvonhippel; 06 Dec 2023, 13:48.

  • #2
    If there is a Unicode symbol for it (and likely there is), then yes.

    Comment


    • #3
      Following up Andrew's useful suggestion: look at https://en.wikipedia.org/wiki/Gender_symbol. Unicde for symbols on the RHS of the page I see

      Comment


      • #4
        I have long taken to heart the advice of William Cleveland to start choice of marker symbols with o and +. The logic is that (open) o tolerates overlap well (think Olympic rings or mug or glass marks on a table top) and that o and + are easy to distinguish.

        The conventional male and female signs are easy to distinguish when they don't overlap. If they do overlap, it's not so easy.

        Even the not so crowded example linked in #1 -- with only 19 data points -- raises this issue.

        One answer could be to use colour too, but watch out there as well: I've often heard people regarding e.g. choices of blue and pink as somewhere between cliché and offensive, which is not to say that other colours won't work better, but then again any other choice might seem arbitrary at best.
        Last edited by Nick Cox; 07 Dec 2023, 02:31.

        Comment


        • #5
          Following Stephen's helpful link, here is some technique:

          Code:
          *GENERATE EXAMPLE DATASET
          webuse sp500, clear
          keep in 1/15
          rename close varfemale
          gen varmale= varfemale+100
          reshape long var, i(date) j(gender) string
          *ASSIGN SYMBOLS 
          assert !missing(gender)
          gen symbol= cond(gender=="female", "`=ustrunescape("\u2640")'", "`=ustrunescape("\u2642")'")
          *GRAPH
          separate var, by(gender) veryshortlabel
          tw connected var? date, sort msy(none ..) mlab(symbol symbol) mlabpos(0 0) leg(off) ///
          xlab(,format(%5.0f)) ytitle(Something) xtitle(Something else) lc(pink%40 blue%40) mlabc(pink blue)
          Res.:

          Click image for larger version

Name:	Graph.png
Views:	1
Size:	50.8 KB
ID:	1736341

          Comment

          Working...
          X