编辑

编辑

我试图用一张图来展示求婚的过程,也许它被称为“靶心”。请看一下这张图。

在此处输入图片描述

我有 7 家公司向我发送了 RFP。我的 RFP 流程有 6 个阶段。每个阶段都用一个圆圈表示。我想像图中所示那样标记每个圆圈。我还想在公司名称下画一条线,并将其连接到圆圈上的点,以指示这家特定公司处于哪个阶段。公司名称可以移动,以便于绘图。我确实画了圆圈和公司,但我陷入了困境。

这是我的代码

\definecolor{forestgreen}{RGB}{60,127,50}
\definecolor{orange}{RGB}{255,109,0}
\definecolor{insightly}{RGB}{255,74,0}
\definecolor{minbelow}{RGB}{167,116,16}
\definecolor{xyellow}{RGB}{205,205,0}
\definecolor{purple}{RGB}{109,2,146}
\definecolor{blue}{RGB}{19,19,202}


\def\mybs{.55cm}
\def\radiuss{\mybs+.1cm*.55cm}
\def\mcs{.55cm}
\def\mybf{.55cm}
\def\radiusf{\mybf+.1cm*.55cm}
\def\mcf{.55cm}

\begin{tikzpicture}
  \draw[green] (0,0) circle (\mybf+.05cm*\mcf);
  \draw[xyellow] (0,0) circle (\mybf+.1cm*\mcf);
  \draw[yellow] (0,0) circle (\mybf+.15cm*\mcf);
  \draw[orange] (0,0) circle (\mybf+.2cm*\mcf);% 
  \draw[red!70] (0,0) circle (\mybf+.25cm*\mcf);
  \draw[red] (0,0) circle (\mybf+.3cm*\mcf);
  \draw[fill=forestgreen] (0,0) circle (.02mm);
  \draw[decoration={text along path,text={RFP Submission},text align={center},text color={red}},decorate] (0.3,3.3) to [bend left=110]  (2.8,1.9);
  \draw[decoration={text along path, text={Contract},text align={center},text color={forestgreen}},decorate] (-1.9,1.0) to [bend left=45](-.9,2);
  \draw[decoration={text along path, text={Contract},text align={center},text color={forestgreen}},decorate] (-1.9,1.0) to [bend left=45](-.9,2);
  \draw[decoration={text along path,text={|\small|Award},text align={center},text color={green}},decorate] (-2,-.9) to [bend left=75]  (1,.9);

  \draw[decoration={text along path,text={|\small|Award},text align={center},text color={green}},decorate] (-2,-.9) to [bend left=75]  (1,.9);
  \node[draw, circle, inner sep=.2mm] (a) at (0,0) {};
  \draw[decoration={text along path, text={Contract},text align={center},text color={forestgreen}},decorate] (-1.9,1.0) to [bend left=45](-.9,2);
  \draw[decoration={text along path,text={|\small|Award},text align={center},text color={green}},decorate] (-2,-.9) to [bend left=75]  (1,.9);

 \foreach \x [count=\xi] in {360, 309, ..., 51}
 {
   \draw[thin, gray!40] (a) -- (\x:\radiusf+89);
 }   
  \def\shi{4.3cm};
  \def\ashi{0};
  \draw (360:\radiusf+\shi) node at (360+\ashi:\radiusf+\shi) {Company 1};
  \draw (309:\radiusf+\shi) node at (309+\ashi:\radiusf+\shi) {Company 2};
  \draw (257:\radiusf+\shi) node at (257+\ashi:\radiusf+\shi) {Company 3};
  \draw (206:\radiusf+\shi) node at (206+\ashi:\radiusf+\shi) {Company 4};
  \draw (154:\radiusf+\shi) node at (154+\ashi:\radiusf+\shi) {Company 5};
  \draw (103:\radiusf+\shi) node at (103+\ashi:\radiusf+\shi) {Company 6};
  \draw (051:\radiusf+\shi) node at (051+\ashi:\radiusf+\shi) {Company 7};
  \def\angle{360/10};
  \end{tikzpicture}

我编辑下面的代码来显示完整的代码

\documentclass[a4paper,12pt,titlepage,twoside,final,openany]{book}
\usepackage{tikz}
\begin{document}

\usetikzlibrary{decorations.text}
\usetikzlibrary{arrows}
\usetikzlibrary{intersections, calc, fpu, decorations.pathreplacing}

\definecolor{forestgreen}{RGB}{60,127,50}
\definecolor{orange}{RGB}{255,109,0}
\definecolor{insightly}{RGB}{255,74,0}
\definecolor{minbelow}{RGB}{167,116,16}
\definecolor{xyellow}{RGB}{205,205,0}
\definecolor{purple}{RGB}{109,2,146}
\definecolor{blue}{RGB}{19,19,202}


\def\mybs{.55cm}
\def\radiuss{\mybs+.1cm*.55cm}
\def\mcs{.55cm}

\def\mybf{.55cm}
\def\radiusf{\mybf+.1cm*.55cm}
\def\mcf{.55cm}

\begin{tikzpicture}

\draw[green] (0,0) circle (\mybf+.05cm*\mcf);
\draw[xyellow] (0,0) circle (\mybf+.1cm*\mcf);
\draw[yellow] (0,0) circle (\mybf+.15cm*\mcf);
\draw[orange] (0,0) circle (\mybf+.2cm*\mcf);
\draw[red!70] (0,0) circle (\mybf+.25cm*\mcf);
\draw[red] (0,0) circle (\mybf+.3cm*\mcf);
\draw[fill=forestgreen] (0,0) circle (.02mm);
\draw[decoration={text along path,text={RFP Submission},text align={center},text color={red}},decorate] (0.3,3.3) to [bend left=110]  (2.8,1.9);
\draw[decoration={text along path, text={Contract},text align={center},text color={forestgreen}},decorate] (-1.9,1.0) to [bend left=45](-.9,2);
\draw[decoration={text along path, text={Contract},text align={center},text color={forestgreen}},decorate] (-1.9,1.0) to [bend left=45](-.9,2);
\draw[decoration={text along path,text={|\small|Award},text align={center},text color={green}},decorate] (-2,-.9) to [bend left=75]  (1,.9);

\draw[decoration={text along path,text={|\small|Award},text align={center},text color={green}},decorate] (-2,-.9) to [bend left=75]  (1,.9);
\node[draw, circle, inner sep=.2mm] (a) at (0,0) {};
\draw[decoration={text along path, text={Contract},text align={center},text color={forestgreen}},decorate] (-1.9,1.0) to [bend left=45](-.9,2);
\draw[decoration={text along path,text={|\small|Award},text align={center},text color={green}},decorate] (-2,-.9) to [bend left=75]  (1,.9);


 \foreach \x [count=\xi] in {360, 309, ..., 51}
 {
   \draw[thin, gray!40] (a) -- (\x:\radiusf+89);
 }
 \def\shi{4.3cm};
 \def\ashi{0};
 \draw (360:\radiusf+\shi) node at (360+\ashi:\radiusf+\shi) {Company 1};
 \draw (309:\radiusf+\shi) node at (309+\ashi:\radiusf+\shi) {Company 2};
 \draw (257:\radiusf+\shi) node at (257+\ashi:\radiusf+\shi) {Company 3};
 \draw (206:\radiusf+\shi) node at (206+\ashi:\radiusf+\shi) {Company 4};
 \draw (154:\radiusf+\shi) node at (154+\ashi:\radiusf+\shi) {Company 5};
 \draw (103:\radiusf+\shi) node at (103+\ashi:\radiusf+\shi) {Company 6};
 \draw (051:\radiusf+\shi) node at (051+\ashi:\radiusf+\shi) {Company 7};

 \def\angle{360/10};
 \end{tikzpicture}
 \end{document}

答案1

像这样吗?

\documentclass[tikz,border=10pt,multi]{standalone}
\usetikzlibrary{decorations.text}
\begin{document}

\definecolor{forestgreen}{RGB}{60,127,50}
\definecolor{orange}{RGB}{255,109,0}
\definecolor{insightly}{RGB}{255,74,0}
\definecolor{minbelow}{RGB}{167,116,16}
\definecolor{xyellow}{RGB}{205,205,0}
\definecolor{purple}{RGB}{109,2,146}
\definecolor{blue}{RGB}{19,19,202}

% use \newcommand - not \def - or you won't know that you are overwriting existing commands (e.g. \angle)
\newcommand*\mybs{.55cm}
\newcommand*\radiuss{\mybs+.1cm*.55cm}
\newcommand*\mcs{.55cm}
\newcommand*\mybf{.55cm}
\newcommand*\radiusf{\mybf+.1cm*.55cm}
\newcommand*\mcf{.55cm}
\newcommand*\shi{4.3cm}
\newcommand*\ashi{0}
\newcommand*\myangle{36}

\tikzset{
  deco/.style n args=2{
    postaction={decorate, decoration={text along path, text=#2, text align=center, text color=#1},},
  },
  mini node/.style={circle, draw, fill=gray, inner sep=.5mm}
}
\begin{tikzpicture}
  \foreach \i/\j [count=\k from=0] in {RFP Submission/red,Repack/red,Proposal/red!50!orange,Finale/orange!50!yellow,Contract/forestgreen,Award/green}
  \draw [\j, deco={\j}{\i}] (0,-\mybf-3mm*\mcf+\k*.5mm*\mcf) arc (270:-90:\mybf+3mm*\mcf-\k*.5mm*\mcf) ;
  \node [draw, fill=forestgreen, circle, inner sep=.2mm] (a) at (0,0) {};
 \foreach \i/\j [count=\k from 1] in {360/3, 309/0, 258/5, 207/4, 155/3, 120/1, 52/2}
 {
   \draw [thin, gray!40] (a) -- (\i:\radiusf+89);
   \draw (\i:\mybf+3mm*\mcf-\j*.5mm*\mcf) node [mini node, inner sep=.2mm] {} -- (\i:\mybf+3mm*\mcf+.5mm*\mcf) coordinate (a\k);
   \ifnum\i<270 \ifnum\i>90
     \node (company \k) [anchor=south east] at (a\k)  {Company \k};
     \draw (company \k.south east) -- (company \k.south west) node [mini node] {};
   \else
     \node (company \k) [anchor=south west] at (a\k)  {Company \k};
     \draw (company \k.south west) -- (company \k.south east) node [mini node] {};
   \fi
   \else
     \node (company \k) [anchor=south west] at (a\k)  {Company \k};
     \draw (company \k.south west) -- (company \k.south east) node [mini node] {};
   \fi
 }
\end{tikzpicture}
\end{document}

7家公司的进展

编辑

如果需要公司使用不同的名称,只需在循环中添加一个额外的变量:

\begin{tikzpicture}
  \foreach \i/\j [count=\k from=0] in {RFP Submission/red,Repack/red,Proposal/red!50!orange,Finale/orange!50!yellow,Contract/forestgreen,Award/green}
  \draw [\j, deco={\j}{\i}] (0,-\mybf-3mm*\mcf+\k*.5mm*\mcf) arc (270:-90:\mybf+3mm*\mcf-\k*.5mm*\mcf) ;
  \node [draw, fill=forestgreen, circle, inner sep=.2mm] (a) at (0,0) {};
 \foreach \i/\j/\m [count=\k from 1] in {360/3/Apple, 309/0/Samsung, 258/5/Tesco, 207/4/Asda, 155/3/John Lewis, 120/1/Coop, 52/2/Weaver Street}
 {
   \draw [thin, gray!40] (a) -- (\i:\radiusf+89);
   \draw (\i:\mybf+3mm*\mcf-\j*.5mm*\mcf) node [mini node, inner sep=.2mm] {} -- (\i:\mybf+3mm*\mcf+.5mm*\mcf) coordinate (a\k);
   \ifnum\i<270 \ifnum\i>90
     \node (company \k) [anchor=south east] at (a\k)  {\m};
     \draw (company \k.south east) -- (company \k.south west) node [mini node] {};
   \else
     \node (company \k) [anchor=south west] at (a\k)  {\m};
     \draw (company \k.south west) -- (company \k.south east) node [mini node] {};
   \fi
   \else
     \node (company \k) [anchor=south west] at (a\k)  {\m};
     \draw (company \k.south west) -- (company \k.south east) node [mini node] {};
   \fi
 }
\end{tikzpicture}

命名更加多样化

相关内容