带箭头的线的频谱

带箭头的线的频谱

我正在尝试用阿拉伯语绘制类似于下面的光谱。我希望它有 10 个箭头。我还想缩小两个箭头之间的间隙。我的代码是:

注意:不要担心阿拉伯语。您可以全部用英语完成。我会完成阿拉伯语部分。

\documentclass[border=10pt,12pt,crop,tikz,convert={outext=.svg,command=\unexpanded{pdf2svg \infile\space\outfile}},multi=false]{standalone}[2012/04/13]
                
\makeatletter
\usepackage{fontawesome5}
\usepackage{smartdiagram}
\usepackage{tikz}
\usetikzlibrary{matrix}
\usetikzlibrary{shapes,arrows,intersections}
\usepackage{tikz}
\usetikzlibrary{matrix,positioning,calc}
\usetikzlibrary{positioning, arrows.meta} 
\usetikzlibrary{fit,backgrounds}
\usetikzlibrary{shapes.geometric}
\usepackage{polyglossia}
\setdefaultlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfontsf[Script=Arabic,Mapping=arabicdigits]{Dubai}
\newfontfamily\arabicfont[Script=Arabic,Mapping=arabicdigits]{Dubai}
\setRTL

\begin{document}
    \begin{tikzpicture}[every node/.style={single arrow, draw=none,minimum height=4.95cm,minimum width=1.2cm}]
    \node [draw=gray,fill=gray, text=white] (C) at (7.35,5) {\textarabic{غير توجيهي}};
    \node [draw=gray,fill=gray,shape border rotate=180, text=white] (P) at (2.65,5) {\textarabic{توجيهي}};
    \draw[<-,very thick,black] ($(C.south)+(.058cm,.02cm)$) -- ++(0,-12pt) node[below] (L1) {\textarabic{سلوك استثنائي}}; 
    \draw[<-,very thick,black] ($(P.south)+(.014cm,.02cm)$) -- ++(0,-12pt) node[below] (L1) {\textarabic{علم الأمراض والضعف}}; 
    \end{tikzpicture}
\end{document}

我的代码的结果是:

在此处输入图片描述

我希望实现的结果是:

在此处输入图片描述

答案1

您可以使用double arrow如下形状:

\documentclass[tikz, border=1 cm]{standalone}
\usetikzlibrary {shapes.arrows, shadings, arrows.meta}
\begin{document}
\begin{tikzpicture}
\node[double arrow, double arrow head extend=.5cm, left color=cyan, right color=teal, text=white, font={\bf \Huge}, inner sep=0.3cm] (doublearrow) {DIRECTIVE\qquad NON-DIRECTIVE};
\draw[-{Triangle[scale=0.5]}, line width=2.5pt] (doublearrow.north -| -6,0) -- +(0,1)   node[above, align=center, font=\small]{Giving\\advice};
\draw[-{Triangle[scale=0.5]}, line width=2.5pt] (doublearrow.north -| 4,0) -- +(0,1)    node[above, align=center, font=\small]{Listening to\\understand};
\draw[-{Triangle[scale=0.5]}, line width=2.5pt] (doublearrow.south -| 1.5,0) -- +(0,-1) node[below, align=center, font=\small]{Reflecting};
\end{tikzpicture}
\end{document}

带文字的阴影双箭头

答案2

从这里开始

\documentclass[border=9,tikz]{standalone}
\usetikzlibrary{shadings}
\begin{document}
\begin{tikzpicture}
    \shade[left color=blue,right color=red, opacity=.2](0,-2)rectangle(6,2);
    \draw(0,1)--(4,1)--(4,2)--(6,0)--(4,-2)--(4,-1)--(0,-1)--cycle;
    \clip(0,1)--(4,1)--(4,2)--(6,0)--(4,-2)--(4,-1)--(0,-1)--cycle;
    \shade[left color=blue,right color=red](0,-2)rectangle(6,2);
\end{tikzpicture}
\end{document}

带箭头的右箭头;左边是蓝色;右边是红色

相关内容