triplot

简介

triplot是一款绘制三元相图的Stata社区命令。

安装

ssc install triplot, replace

示例

clear
input float(year agriculture industry tertiary)
    1800 87.2 1.4 11.5
    1810 81 6.5 12.5
    1820 73 16 11.1
    1830 69.7 17.6 12.6
    1840 58.8 24.4 16.8
    1850 49.5 33.8 16.7
    1860 40.6 37 22.4
    1870 47 32 21
    1880 43.7 25.2 31.1
    1890 37.2 28.1 34.7
    1900 35.3 26.8 37.9
    1910 31.1 36.3 32.6
    1920 32.5 32 35.5
    1930 20.4 35.3 44.3
    1940 15.4 37.2 47.4
    1950 11.9 38.3 49.8
    1960 6 34.8 59.2
    1970 3.1 28.6 68.3
    1980 2.1 22.5 75.4
    end

label var tertiary "services and information"

set scheme stcolor
generate pos = 3
replace pos = 9 if inlist(year, 1900, 1920)
replace pos = 10 if inlist(year, 1870, 1980)
replace pos = 12 if inlist(year, 1880, 1970)
triplot agriculture industry tertiary, c(l) max(100) mcolor(stc1) mlabel(year) mlabsize(*0.7) mlabc(stc1) clpat(solid) mlabvpos(pos)

联系

作者:Nicholas J. Cox

邮箱:n.j.cox@durham.ac.uk


基本信息
词条统计

所属分类Stata

浏览次数62

创建者epiman

最后编辑epiman