突出顯示智能圖(圓形圖)中的(某些)項目

突出顯示智能圖(圓形圖)中的(某些)項目

我已經創建了一個基本的智慧圖。現在我想突出顯示智慧圖中的 2 個項目,但我無法找到解決方案。

我嘗試為周圍的 2 個節點建立一些背景圖層,如圖所示http://www.texample.net/tikz/examples/nodetutorial/,例如,對於項目互連+分類。

這就是我現在所擁有的:

編輯:更新圖片

智慧圖生命週期

\documentclass[12pt]{article}
\usepackage{smartdiagram}
\usesmartdiagramlibrary{additions}
\begin{document} 

\tikzset{every shadow/.style={fill=none,shadow scale=0}}                                                 
\tikzset{module/.append style={top color=\col,bottom color=\col}}
\begin{center}

\smartdiagramset{custom/.style={
    arrow tip=latex,
    arrow line width=2.5pt,
    module shape=circle,
    font=\footnotesize,
    text width=2cm,
    circular distance=5cm,
    border color=none,
    additions={
        additional item font=\normalsize,
        additional item fill color=lightgray!50,
        additional item offset=1.20cm,
        additional item text width=2.2cm,
        additional item width=5cm
        }
    }
}

\smartdiagramset{custom}
\smartdiagramadd[circular diagram:clockwise]
    {Interlinking / Fusing, Classification / Enrichment, 
    Quality Analysis, Evolution / Repair,
    Search / Browsing / Exploration, Extraction, 
    Storage / Querying, 
    Manual revision / authoring}
    {below of module2/Linked Data Life Cycle}
\end{center}
\end{document}

答案1

這並不太難。您可以「破解」該包。看這裡了解如何自動旋轉橢圓,並在想要在前景上繪製橢圓時刪除背景內容。您也可以使用rounded rectangle, 例如。訣竅是讓tikzpicture每個組中的每個人都執行所需的命令。節點的命名約定可以在手冊中找到smartdiagram,我從中推斷名稱module1module2。請注意,這個 smartdiagram 涉及兩個tikzpictures,我們只想「破解」第一個,因此是 counter sdpic。 (如果載入的話,箭頭看起來會更好bending。)

\documentclass[12pt]{article}
\usepackage{smartdiagram}
\usesmartdiagramlibrary{additions}
\usetikzlibrary{fit,shapes.geometric,bending}
\newcounter{sdpic}
\begin{document} 

\tikzset{every shadow/.style={fill=none,shadow scale=0}}                                                 
\tikzset{module/.append style={top color=\col,bottom color=\col}}
\begin{center}
\begingroup% <- not really needed within center
\setcounter{sdpic}{0}
\tikzset{every picture/.append style={execute at end picture={
\stepcounter{sdpic}
\ifnum\value{sdpic}<2
\begin{pgfonlayer}{background}
\node[fit=(module1)(module2),ellipse,draw,rotate=20,inner
sep=-3pt,thick,fill=blue!20]{};
\end{pgfonlayer}
\fi}
}}
\smartdiagramset{custom/.style={
    arrow tip=latex,
    arrow line width=2.5pt,
    module shape=circle,
    font=\footnotesize,
    text width=2cm,
    circular distance=5cm,
    border color=none,
    additions={
        additional item font=\normalsize,
        additional item fill color=lightgray!50,
        additional item offset=1.20cm,
        additional item text width=2.2cm,
        additional item width=5cm
        }
    }
}
\smartdiagramset{custom}
\smartdiagramadd[circular diagram:clockwise]
    {Interlinking / Fusing, Classification / Enrichment, 
    Quality Analysis, Evolution / Repair,
    Search / Browsing / Exploration, Extraction, 
    Storage / Querying, 
    Manual revision / authoring}
    {below of module2/Linked Data Life Cycle}
\endgroup%
\end{center}
\end{document}

在此輸入影像描述

舊答案\ifnum :這裡我為模組 2 添加了藍色光環,為模組 4 添加了紅色光環,但是您會發現透過相應地更改和語句,可以輕鬆地以您想要的方式突出顯示您想要的節點\tikzset

\documentclass[12pt]{article}
\usepackage{smartdiagram}
\usesmartdiagramlibrary{additions}
\begin{document} 

\tikzset{every shadow/.style={fill=none,shadow scale=0}}                                                 
\tikzset{module/.append style={top color=\col,bottom color=\col,
/utils/exec={\ifnum\xi=2
\tikzset{draw=blue,thick}
\fi
\ifnum\xi=4
\tikzset{draw=red,thick}
\fi}}}
\begin{center}

\smartdiagramset{custom/.style={
    arrow tip=latex,
    arrow line width=2.5pt,
    module shape=circle,
    font=\footnotesize,
    text width=2cm,
    circular distance=5cm,
    border color=none,
    additions={
        additional item font=\normalsize,
        additional item fill color=lightgray!50,
        additional item offset=1.20cm,
        additional item text width=2.2cm,
        additional item width=5cm
        }
    }
}

\smartdiagramset{custom}
\smartdiagramadd[circular diagram:clockwise]
    {Interlinking / Fusing, Classification / Enrichment, 
    Quality Analysis, Evolution / Repair,
    Search / Browsing / Exploration, Extraction, 
    Storage / Querying, 
    Manual revision / authoring}
    {below of module2/Linked Data Life Cycle}
\end{center}


\end{document}

在此輸入影像描述

答案2

輪圖我寫的包包可以用。

顏色以帶有 key 的列表形式給出slices style{list}

文本中包含一些/。最初,/用於分離資料。因此,我們使用 鍵separator columns=;將此分隔符號變更為;

切片形狀的圓圈是透過 key 獲得的slices

我們設定value=1為每個切片的大小相同。我們還將密鑰設為data空。

箭頭是用第二個\wheelchart和鑰匙獲得的slices end arrow

在此輸入影像描述

\documentclass[border=6pt]{standalone}
\usepackage{wheelchart}
\begin{document}
\begin{tikzpicture}
\draw[fill=blue!20,shift={(112.5:{4.5*cos(22.5)})},rotate=22.5] (0,0) ellipse[x radius=3.5,y radius=2];
\pgfkeys{
  /wheelchart,
  slices style{list}={red!40,cyan!40,blue!40,green!40,orange!40,yellow!40,magenta!40,brown!40,violet!40,teal!40}%colors as defined by the smartdiagram package
}
\wheelchart[
  data=,
  middle=Linked\\Data Life\\Cycle,
  middle fill=lightgray!50,
  radius={2}{7},
  separator columns=;,
  slices={(0,0) circle[radius=1.2];},
  start half=135,
  value=1,
  wheel data=\WCvarA,
  wheel data pos=0.5,
  wheel data style={align=center}
]{%
  Interlinking\\/ Fusing,
  Classifi-\\cation /\\Enrichment,
  Quality\\Analysis,
  Evolution\\/ Repair,
  Search /\\Browsing /\\Exploration,
  Extraction,
  Storage /\\Querying,
  Manual\\revision /\\authoring%
}
\wheelchart[
  explode=4,
  radius={1}{1.2},
  slices end arrow={1.5}{-1},
  start angle=182,
  total count=8
]{}
\end{tikzpicture}
\end{document}

相關內容