I've never drawn plots in Latex before and I'm really struggling at drawing some simple pictures with the tikz package. Can anybody help me? The two lines in the second and fourth quadrant should be made perpendicular to the vectors
x_{.3} and x_{.1} respectively.
1 Answer
Perhaps this will get you started:
Here is the code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows.meta}
\begin{document}
\begin{tikzpicture}[>=Straight Barb]
\draw[fill=black](105:1.6)--(285:0.6)-| cycle; % filled triangle
\draw[orange](105:1.8)--(285:0.8);
\draw[thick](0,2)node[above]{Security 2}--(0,0)--(2,0)node[right]{Security 1};
\foreach \x [count=\xi] in {15,45,75} {
\draw[->](0,0)--(\x:1.8);
\node at (\x:2){$x_{\xi}$};
}
\end{tikzpicture}
\end{document}
Edit
You can make the labels smaller by for example, ad \small
to the labels. YOu can make the whole picture bigger by adding scale=3
to the tikzpicture environment -- there's also
xscaleand
yscale` if you want to scale by different factors in the x and y directions.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows.meta}
\begin{document}
\begin{tikzpicture}[>=Straight Barb,scale=3]
\draw[fill=black](105:1.6)--(285:0.6)-| cycle; % filled triangle
\draw[orange](105:1.8)--(285:0.8);
\draw[thick](0,2)node[above]{\small Security 2}--(0,0)--(2,0)node[right]{\small Security 1};
\foreach \x [count=\xi] in {15,45,75} {
\draw[->](0,0)--(\x:1.8);
\node at (\x:2){$x_{\xi}$};
}
\end{tikzpicture}
\end{document}
\draw[->] (3,3) -- ++(30: 2);