Announcement

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

  • twoway xsc(titleg) not work

    Hi,
    I would love to ask the syntax for the x axis in the adjustment of gap. I would love to keep the gap to be every 5 years. But the following syntax does not work. The gap still show in 20years.
    Code:
    twoway line mktinfo_share_y privateinfo_share_y publicinfo_share_y noise_share_y year, xsc(titleg(5))
    Can anyone help me with this issue?

    The data is below
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(year mktinfo_share_y privateinfo_share_y publicinfo_share_y noise_share_y)
    1960  .13041024  .3733783 .29362082 .20259063
    1961 .073339835  .4178522 .32064235  .1881656
    1962  .14643538  .3301847 .19206716 .33131275
    1963  .03197268  .4021853  .2638095  .3020326
    1964  .02464576  .4347318  .3036787 .23694368
    1965  .05063208  .4172321  .3255339 .20660193
    1966   .1593086  .3458911 .26931205  .2254883
    1967  .07748508  .3942994  .3503651 .17785043
    1968   .1573365   .369221 .27044126 .20300128
    1969  .20267823  .3100887 .27250445 .21472862
    1970  .25610182 .26478475 .24079363  .2383198
    1971   .1479524   .348977  .3133605  .1897101
    1972   .0594992  .3961067  .3568313  .1875628
    1973  .12018538  .3180535   .322795 .23896605
    1974  .10394252  .3184373 .29521003 .28241017
    1975   .1068501   .329824  .3284898 .23483604
    1976  .06221274  .3953319 .33132565 .21112975
    1977  .06021249  .3959777  .3023757  .2414341
    1978  .16461247  .3482885  .2696097 .21748935
    1979  .09401213  .3662696  .3224206 .21729766
    1980  .14132091  .3566044 .30432045  .1977542
    1981  .09041028   .355794  .3553352  .1984606
    1982   .0918958 .28607875 .20093794  .4210875
    1983  .04022127  .3568515  .4011464  .2017808
    1984  .06578613  .3478476  .3695956  .2167707
    1985  .03835262  .3397999  .3866186 .23522887
    1986  .03599873   .316371  .3809255  .2667047
    1987  .15373954 .25101054  .2674245  .3278254
    1988  .02184406  .3140104  .3311886  .3329569
    1989 .019295767   .332846  .3467034  .3011549
    1990  .04027881  .2425528  .3500148  .3671535
    1991  .04223945 .25066632  .3465352   .360559
    1992 .017675482 .26294032  .3070931  .4122911
    1993 .017355671  .2821767 .26720566   .433262
    1994 .022968814 .29116616 .25678125  .4290838
    1995 .016970845  .3106397   .277799  .3945904
    1996  .03017703  .3299761  .2958179 .34402895
    1997 .024186626  .3423854  .3279377  .3054903
    1998  .07659408  .2917039 .33943075 .29227126
    1999  .02982794  .3597882  .3402749 .27010894
    2000  .10213038  .3011689  .3390727 .25762808
    2001  .07980388  .2890282  .3811088 .25005913
    2002  .05904123 .29172763  .3810438 .26818734
    2003  .05759099  .3135848  .3761155 .25270876
    2004  .07126597    .35753  .3630565  .2081475
    2005  .03740621  .4019119  .3442029   .216479
    2006  .04637509 .38173935  .3703479  .2015377
    2007  .04924459  .3604372   .350387 .23993114
    2008   .1022275  .2295993  .3655846 .30258855
    2009  .15707934  .2447521  .3337749  .2643937
    2010  .09471938  .3393101  .3316359  .2343346
    2011  .10230943  .3092409  .3148359 .27361375
    2012  .03348233  .3653982  .3663463  .2347731
    2013 .027067374 .37494355  .3489747  .2490144
    2014  .04696841   .342073  .3779756   .232983
    2015  .03929329  .3479499  .3912172  .2215396
    2016   .0622444  .3033819  .3918344 .24253935
    2017 .016474597  .3483695  .3579965 .27715936
    2018  .05560206  .3183716  .3905132  .2355132
    2019 .031254992  .3472347 .39791405  .2235963
    2020  .14727966 .27763695 .31814265 .25694075
    2021  .04324708  .3186812  .3814489 .25662282
    end

  • #2
    titlegap() controls the spacing between the x axis and its accompanying axis title (in some other software called the axis label).

    What you want concerns the axis labels, meaning in other terms the axis tick labels. xla(1960(5)2020) will get what you ask, although xla(1960(10)2020) xtic(1965(10)2015) is likely to seem less busy.

    Comment

    Working...
    X