
在 LaTeX 中排版 $\mathbb{R}$ 上的二元关系图的最佳方法是什么,类似于以下内容:
粗线表示二元关系(由三条线段组成)。
答案1
$\text{No MWE or attempt} \mapsto \text{minimal explanations from me}$
。本文所涵盖的所有内容均在第 2 章pgfmanual
或Tikz 命令总结。这是一个方法,但可能不是最好的方法:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[thin,gray,text=black,<->] (0,1.4) node[left] {$y$}
|- (1.4,0) node[below] {$x\vphantom{1}$};
\draw[densely dotted,gray] (1,0) |- (0,1);
\draw[thick] (0,1) node[left] {$1$}
-- (0,0) node[below left] {$0$}
-- (1,0) node[below] {$1$}
(0,0) -- (1,1);
\end{tikzpicture}
\end{document}