Announcement

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

  • Graph: display negative sign using en-dash instead of hyphen

    Hi list,

    Code:
    webuse auto,clear
    replace rep78=-1*rep78 if foreign==1
    scatter rep78 trunk,ysc(r(-5 5)) ylabel(-5(2)5) yla(, ang(h))
    Click image for larger version

Name:	Graph3.png
Views:	1
Size:	30.2 KB
ID:	1583737


    Someone told me that the negative sign on the y-axis is a hyphen and asked me to change it to en-dash (see below for how en-dash looks different from hyphen in Word), but I cannot figure out how to do it in Stata.

    Thank you!

    Click image for larger version

Name:	WeChat Image_20201127203657.png
Views:	1
Size:	4.7 KB
ID:	1583738

  • #2
    If you know the range you are going to use for yscale, one way of doing it would be:

    Code:
    scatter rep78 trunk, ylab(-5 "–5" -3 "–3" -1 "–1" 1 3 5 , ang(h))
    Roman

    Comment


    • #3
      Originally posted by Roman Mostazir View Post
      If you know the range you are going to use for yscale, one way of doing it would be:

      Code:
      scatter rep78 trunk, ylab(-5 "–5" -3 "–3" -1 "–1" 1 3 5 , ang(h))
      Thank you Roman! I really appreciate it. Your reply saved me a lot of time.

      Comment

      Working...
      X