现在我在 tikz 上遇到了一个问题。
\documentclass{article}
\usepackage{tikz}
\begin{document}
now I've an issues on tikz.
\begin{center}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm]
\clip(-4.263907326357041,-2.169808170515719) rectangle (4.512244003818671,1.5716037123486593);
\draw [line width=1pt] (-3,1)-- (0,0);
\draw [line width=1pt] (-3,-1)-- (0,0);
\draw [line width=1pt] (0,0)-- (3,0);
\draw [->,line width=1pt] (-3,1) -- (-1.47,0.49);
\draw [->,line width=1pt] (-3,-1) -- (-1.548,-0.516);
\draw [->,line width=1pt] (0,0) -- (2,0);
\draw (-2.076774358733703,1.5254134421898398) node[anchor=north west] {$X$};
\draw (-2.253451692101613,-0.8880281736084783) node[anchor=north west] {$Y$};
\draw (0.5629759052396007,-0.1110413040590908059) node[anchor=north west] {$S = X + Y$};
\end{tikzpicture}
\end{center}
\end{document}
答案1
你还没有说你想要什么输出,你可以删除
,>=triangle 45
并使用默认箭头,或添加
\usetikzlibrary{arrows}
在你的序言中,定义这种形式。