Announcement

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

  • Graph: couldn't get the looking of apostrophe right

    Hi list,

    I need to include an apostrophe in my figure. Someone asked me to change the looking of the apostrophe in the title (the ' in Tom's) to look like a normal apostrophe in Times New Roman (See the second graph below), but I don't know how to do it in Stata (I have tried to set the default font to Times New Roman using graph set but it doesn't work). Below is an example:
    Code:
    webuse auto,clear
    twoway scatter price headroom, title("Tom's wallet is suspicious", size(*.7) color(gs0) pos(11))
    Click image for larger version

Name:	Graph2.png
Views:	1
Size:	33.9 KB
ID:	1583733

    Click image for larger version

Name:	WeChat Image_20201127201451.png
Views:	1
Size:	2.5 KB
ID:	1583732


  • #2
    May be not very efficient but I was able to produce this graph by coping the punctuation from a website and put it inside Stata code:

    Code:
    #delimit ;
    twoway scatter price headroom,
    title("Tom’s wallet is suspicious", size(*.7) color(gs0) pos(11))
    ;
    #delimit cr
    Click image for larger version

Name:	test.png
Views:	1
Size:	41.9 KB
ID:	1583744
    Roman

    Comment


    • #3
      You can find the corresponding unicode character and use one of Stata's unicode string functions to include it. Here

      Code:
      title("Tom`=ustrunescape("\u2019")'wallet is suspicious"

      Comment


      • #4
        Thank you Andrew and Roman!

        Comment

        Working...
        X