矩阵上方绘图

矩阵上方绘图

我需要帮助 !

我需要添加带箭头的黄点。在我的模型中

如果可能的话,可以添加一些坐标,以便将来你可以将点从某个位置移动

矩阵 bcg

\documentclass{article}

\usepackage{graphicx}
\usepackage{nicematrix}

\definecolor{myorange}{RGB}{231,152,0}

\begin{document}

{\setlength{\arrayrulewidth}{2pt}
\setlength{\tabcolsep}{3pt}
\arrayrulecolor{myorange}
\begin{NiceTabular}{c c l>{\raggedleft\arraybackslash}p{2.5cm}| l>{\raggedleft\arraybackslash}p{2.5cm} | }[cell-space-limits=\tabcolsep]
 & & \Block[fill=myorange]{1-4}{\color{white}\bfseries long text}\\
 & & \Block[fill=myorange]{1-2}{\color{yellow}text} & & \Block[fill=myorange]{1-2}{\color{yellow}text}&\\
 \Block[fill=myorange]{4-1}{\rotate\color{white}\bfseries long text} & \Block[fill=myorange]{2-1}{\rotate\color{yellow} text} & \includegraphics[width=1cm]{example-image-a} & &  \includegraphics[width=1cm]{example-image-b} & \\
 &  & & \textcolor{myorange}{\large\bfseries text:}\par\footnotesize some text that occupies multiple lines &   & \textcolor{myorange}{\large\bfseries a longer text:}\par\footnotesize some text here some text here\\
 \hline
   & \Block[fill=myorange]{2-1}{\rotate\color{yellow} text} & \includegraphics[width=1cm]{example-image-c} & &  \includegraphics[width=1cm]{example-image} & \\
 &  & & some text here &   & some text here\\
 \hline
\end{NiceTabular}}

\end{document}

答案1

\CodeAfer您可以使用 中的Tikz 指令绘制箭头{NiceTabular}

\documentclass{article}

\usepackage{graphicx}
\usepackage{nicematrix,tikz}

\definecolor{myorange}{RGB}{231,152,0}

\begin{document}

{\setlength{\arrayrulewidth}{2pt}
\setlength{\tabcolsep}{3pt}
\arrayrulecolor{myorange}
\begin{NiceTabular}{c c l>{\raggedleft\arraybackslash}p{2.5cm}|l>{\raggedleft\arraybackslash}p{2.5cm}|}[cell-space-limits=\tabcolsep]
\CodeBefore
  \rectanglecolor{myorange}{1-3}{2-6}
  \rectanglecolor{myorange}{3-1}{6-2}
\Body
& & \Block{1-4}{\color{white}\bfseries long text}\\
& & \Block{1-2}{\color{yellow}text} & & \Block{1-2}{\color{yellow}text} \\
\Block{4-1}{\rotate\color{white}\bfseries long text} 
& \Block{2-1}{\rotate\color{yellow} text} 
& \includegraphics[width=1cm]{example-image-a} & &  \includegraphics[width=1cm]{example-image-b} \\ 
& & & \textcolor{myorange}{\large\bfseries text:}\par\footnotesize some text that occupies multiple lines & & 
\textcolor{myorange}{\large\bfseries a longer text:}\par\footnotesize some text here some text here \\ \Hline
& \Block{2-1}{\rotate\color{yellow} text} & \includegraphics[width=1cm]{example-image-c} & &  \includegraphics[width=1cm]{example-image} \\
& & & some text here &   & some text here\\
\Hline
\CodeAfter
  \begin{tikzpicture} [line width=2pt,gray]
  \draw [->] (4-|5) ++(6mm,0) -- ++(-9mm,0) ;
  \draw [fill=yellow!50] (4-|5) ++ (6mm,0) circle (4mm) ;
  \end{tikzpicture}%
\end{NiceTabular}}

\end{document}

(4-|5)是(虚拟)水平规则编号 4 和垂直规则编号 5 相交处的节点。

与往常一样nicematrix,您需要进行多次编译。

上述代码的输出

相关内容