-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomparative_advantage.Rnw
119 lines (90 loc) · 3.55 KB
/
comparative_advantage.Rnw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{fontspec}
\usetikzlibrary{positioning,decorations.text,pgfplots.groupplots,intersections,shapes.multipart}
\pgfplotsset{compat=1.7}
\definecolor{nice_blue}{HTML}{377EB8}
\definecolor{nice_green}{HTML}{80C87D}
\definecolor{nice_purple}{HTML}{984EA3}
\definecolor{nice_red}{HTML}{E41A1C}
\definecolor{nice_orange}{HTML}{FF7F00}
\definecolor{nice_light_orange}{HTML}{FDBF6F}
\definecolor{nice_yellow}{HTML}{FFFF99}
\definecolor{nice_pink}{HTML}{FB9A99}
\pgfplotsset{
simple graphs/.style={
domain=0:12
,xmin=0
,xmax=12
,ymin=0
,ymax=12
,axis lines*=left
,xtick=\empty
,ytick=\empty
,every axis y label/.style={
at={(axis description cs:-0.05,0.1)}
,rotate=90
,anchor=west},
}
,every axis x label/.style={
at={(axis description cs:0.5,-0.1)}
,anchor=south}
}
\tikzset{
small_dot/.style={
fill,
circle,
inner sep=1.5pt
}
}
\def\myshift#1{\raisebox{2ex}}
\begin{document}
%\resizebox{\columnwidth}{!}{
\begin{tikzpicture}[scale=0.95]
\centering
% \node at (.75,4.5) {\fontspec{Frutiger LT Std 55 Roman}w\textsubscript{1}};
% \node at (1.25,5) {\fontspec{Frutiger LT Std 55 Roman}w\textsubscript{2}};
% \node at (1.75,5.45) {\fontspec{Frutiger LT Std 55 Roman}w\textsubscript{3}};
% \node[color=nice_purple] at (5.35,3.5) {\fontspec{Frutiger LT Std 55 Roman}Well-being};
\begin{axis}[
simple graphs,
ymax=6,
xmax=6,
ytick=\empty,
xtick=\empty,
enlarge x limits=false,
axis lines*=left,
axis line style = {gray!80, line width=2.83464567pt,shorten <=-0.5\pgflinewidth},
xlabel=\fontspec{Frutiger LT Std 55 Roman}Market Investments in Child,
ylabel=\fontspec{Frutiger LT Std 55 Roman}Direct Parenting Efficiency
]
\addplot[nice_blue, line width=2.83464567pt] plot coordinates {
(0,5.1)
(5.1,0)};
\addplot [nice_purple, line width=2.83464567pt, smooth] table {util1.dat};
\addplot[nice_blue, line width=2.83464567pt] plot coordinates {
(0,3)
(3,0)};
\addplot[->, line cap=round, nice_purple, line width=2.83464567pt, shorten <=-0.75pt] plot coordinates {
(.63,4.5)
(.63,6)};
\addplot[->, line cap=round, nice_purple, line width=2.83464567pt, shorten <=-0.75pt] plot coordinates {
(4.51,.625)
(6,.625)};
\end{axis}
\node (wbar) at (8.5,2.5) [draw=none,fill=none] {\fontspec{Frutiger LT Std 55 Roman}Societal Wellbeing Threshold};
\node (wbar_arrow_end) at (6,.5) [draw=none,fill=none] {};
\draw[->,bend right, line width=2.83464567*0.5pt] (wbar) to node [auto] {} (wbar_arrow_end);
\node[small_dot, label={above:\fontspec{Frutiger LT Std 55 Roman}A}] (A) at (.4,4.525) {};
\node[small_dot, label={above:\fontspec{Frutiger LT Std 55 Roman}B}] (B) at (2,3.2125) {};
\node[draw=none, align=center] (Income2) at (5.5,3.75) {\fontspec{Frutiger LT Std 55 Roman}Parent\\
\fontspec{Frutiger LT Std 55 Roman}Income 2};
\node[draw=none, align=center] (Income1) at (1,.75) {\fontspec{Frutiger LT Std 55 Roman}Parent\\
\fontspec{Frutiger LT Std 55 Roman}Income 1};
\node[draw=none] (Income2_pt) at (3,2.225) {};
\node[draw=none] (Income1_pt) at (1.75,1.5) {};
\draw[->,bend right, line width=2.83464567*0.5pt] (Income2) to node [auto] {} (Income2_pt);
\draw[->,bend left, line width=2.83464567*0.5pt] (Income1) to node [auto] {} (Income1_pt);
\end{tikzpicture}
\end{document}