Announcement

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

  • Subtle gender discrimination in Stata graphics

    Producing a scatterplot with symbols for male ♂ and female ♀ I came across this funny issue:

    tw scatteri 1 1 "{c 11}" 2 1 "{c 12}" 3 1 "{c 11}{c 12}" , scale(2)

    Stata (12.1) seems to be willing to produce the symbol for females only in connection with the male symbol (or some other symbol), but not in isolation...


  • #2
    FYI I get the same graph as you (or at least what I think you're getting) in versions 11, 13.1 and 14

    Comment


    • #3

      What is the problem? (Stata 12.0/Windows) Sergiy

      Click image for larger version

Name:	male-female.png
Views:	1
Size:	46.1 KB
ID:	1300832

      Comment


      • #4
        Sergiy, the problem is that others don't get your graph.

        Click image for larger version

Name:	mf.png
Views:	1
Size:	12.7 KB
ID:	1300867

        Comment


        • #5
          Right click your graph. Select Preferences.Tell me what font do you see set there.
          Then change the font to "3D Unicode".
          Rebuild the graph if necessary.
          If you don't have a "3D Unicode" in the list, tell me a few choices that are present there in your installation.
          Let me know if this fixes the issue.

          Best, Sergiy Radyakin

          Comment


          • #6
            Sergiy, in versions 12.1, 13.1 and 14 (Windows 7, Stata MP4) I get the graph that Frederich shows. The font shown in graph preferences is Arial (default) in every case. "3D Unicode" does not appear in the drop-down menu, as far as I can see, in any of the 3 versions. I get the "standard" list in all version plus, in version 14, a number of them with names prefixed by "@". Experimenting with several of these did not resolve the issue. E.g. "@Arial Unicode MS". To me, it's puzzling because I would have thought the use of a SMCL directive would have been ok.

            Comment


            • #7
              Even if a different font shows all symbols it doesn't explain why with the default font the command
              Code:
              tw scatteri 1 1 "{c 11}" 2 1 "{c 12}" 3 1 "{c 11}{c 12}" , scale(2)
              draws the female symbol at y=3 but not at y=2.

              Comment


              • #8
                First, I would like to reassure that the image posted in #3 is an original, unmodified screenshot of Stata 12.0 running on Windows 7. Fact.

                Rest is guesswork. If switching the fonts didn't help (I still haven't seen the list of the fonts that are available in the drop down menu on the machines exhibiting the problem), try the following, which I expect will force the feminine character:

                Code:
                tw scatteri 1 1 "{c 31}{c 11}" 2 1 "{c 31}{c 12}" 3 1 "{c 31}{c 11}{c 12}" , scale(2)
                Including the "unit separator" char should not hurt, it is invisible anyways, and including it anywhere should help, whether in the beginning, end, or the middle of the label.
                If this doesn't help either, contact Stata Tech Support.

                For those of you interested in showing special characters in Stata graphs here is an overview of other potentially useful characters (actual Stata graph):
                http://www.radyakin.org/stata/symbols/symbols.png

                Best, Sergiy Radyakin

                Comment


                • #9
                  When I try:
                  Code:
                  scatter mpg weight , title("{c 11}") xtitle("{c 12}") ytitle("{c 11}{c 12}")
                  I see the same problem on my screen: no valid x-axis symbol. But when I print the graph, the female symbol is there.

                  Funny, isn't it?

                  Comment


                  • #10
                    I googled the term "3D Unicode font" and found a page that read:
                    To read these pages install Open Type fonts - MS Free core fonts for the Web or use the font Lucida Sans Unicode on Windows.
                    Using this font, the female symbol renders on its own. Though as Friedrich said, this still doesn't explain why the symbol doesn't render on its own with the default font.

                    Code:
                    graph set window fontface "Lucida Sans Unicode"
                    tw scatteri 1 1 "{c 11}" 2 1 "{c 12}" 3 1 "{c 11}{c 12}" , scale(2)
                    I see the same issue using display
                    Code:
                    di "{c 11}"
                    di "{c 12}"
                    di "{c 11}{c 12}"

                    Comment


                    • #11
                      Originally posted by Sergiy Radyakin View Post
                      For those of you interested in showing special characters in Stata graphs here is an overview of other potentially useful characters (actual Stata graph):
                      http://www.radyakin.org/stata/symbols/symbols.png
                      The special characters are described in Stata documentation: http://www.stata.com/manuals14/g-4text.pdf#g-4text

                      Comment

                      Working...
                      X