Announcement

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

  • Graph align xtitle right

    Hi, I have been trying to move my xtitle in a graph towards the right instead of centered. I checked online and tried with many different options, but none seem to work. For a reproducible example:

    Code:
     sysuse auto
    eststo reg_1: reg price mpg
    eststo reg_2: reg price mpg headroom
    coefplot reg_1 reg_2, keep(mpg) xtitle("Confidence intervals")
    I would like to shift the xtitle a bit more towards the right, is this possible in any way? Thank you very much!
    Last edited by Joan Marti; 11 Jan 2023, 18:20.

  • #2
    Let's use a simpler example that doesn't hinge on community-contributed commands (which you don't explain, contrary to FAQ Advice #12). ,.

    Code:
    . sysuse auto, clear
    (1978 automobile data)
    
    . scatter mpg weight, xtitle(Some text, place(e))
    
    . scatter mpg weight, xtitle("                   Some text")
    The second method seems more unpredictable. ,

    Comment


    • #3
      Use SMCL (Stata Markup and Control Language):
      Code:
      coefplot reg_1 reg_2, keep(mpg) xtitle("{ralign 60:Confidence intervals}")
      Nick's method is more reasonable here. See the -placement()- suboption
      Code:
      help textbox_options
      Last edited by Chen Samulsion; 11 Jan 2023, 19:09.

      Comment


      • #4
        thank you very much!

        Comment

        Working...
        X