我经常在论文中看到一张表格,其中有一列圆圈,填充率为 25/50/75/100%,以显示优先级/满足要求的级别,表示是/否/未知/NA 等?
- 这样的圆圈(用法)有特定的名称吗?
- 我怎样才能轻松地将这些圆圈添加到表中?
- 科学论文中还使用哪些其他常见的(可视化)技术来可视化这种级别/排名/分类?到目前为止,我已经看到了这些圆圈和++..--。但我是新手,所以可能还有更多的技术。
谢谢
答案1
您指的是下面的命令吗?请务必定义您自己的命令。这样,您以后仍然可以切换到其他命令
% arara: lualatex
\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{unicode-math}
\setmathfont{xits-Math}
\newcommand*{\noPrior}{\ensuremath{\mdlgwhtcircle}}
\newcommand*{\quarterPrior}{\ensuremath{\circleurquadblack}}
\newcommand*{\halfPrior}{\ensuremath{\circlerighthalfblack}}
\newcommand*{\threeQuarterPrior}{\ensuremath{\blackcircleulquadwhite}}
\newcommand*{\fullPrior}{\ensuremath{\mdlgblkcircle}}
\begin{document}
\begin{tabular}{lr}
\toprule
Symbol & Meaning\\
\midrule
\noPrior & \SI{0}{\percent}\\
\quarterPrior & \SI{25}{\percent}\\
\halfPrior & \SI{50}{\percent}\\
\threeQuarterPrior & \SI{75}{\percent}\\
\fullPrior & \SI{100}{\percent}\\
\bottomrule
\end{tabular}
\end{document}
这是 Ti 的一个想法钾Z:
% arara: pdflatex
\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{tikz}
\newcommand*{\priority}[1]{\begin{tikzpicture}[scale=0.15]%
\draw (0,0) circle (1);
\fill[fill opacity=0.5,fill=blue] (0,0) -- (90:{#1>0?1:0}) arc (90:90-#1*3.6:1) -- cycle;
\end{tikzpicture}}
\begin{document}
\begin{tabular}{lr}
\toprule
Symbol & Meaning\\
\midrule
\priority{0} & \SI{0}{\percent}\\
\priority{15} & \SI{15}{\percent}\\
\priority{33} & \SI{33}{\percent}\\
\priority{75} & \SI{75}{\percent}\\
\priority{100} & \SI{100}{\percent}\\
\bottomrule
\end{tabular}
\end{document}
答案2
答案3
LaRiFaRi 使用该包给出的一个很好的答案的变体l3draw
:
\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{l3draw}
\ExplSyntaxOn
\NewDocumentCommand { \FilledCircle } { m } {
\draw_begin:
\draw_baseline:n { -.1em }
\draw_path_moveto:n { 0em , 0.75em }
\draw_path_arc:nnn { 90 } { 90 - #1 * 360 } { 0.5em }
\draw_path_lineto:n { 0em , 0.25em }
\draw_path_close:
\draw_path_use_clear:n { fill }
\draw_path_circle:nn { 0em , 0.25em } { 0.5em }
\draw_path_use_clear:n { stroke }
\draw_end:
}
\ExplSyntaxOff
\begin{document}
\begin{tabular}{lr}
\toprule
Symbol & Meaning \\
\midrule
\FilledCircle{0} & \SI{0}{\percent} \\
\FilledCircle{.33} & \SI{33}{\percent} \\
\FilledCircle{.25} & \SI{25}{\percent} \\
\FilledCircle{.5} & \SI{50}{\percent} \\
\FilledCircle{.75} & \SI{75}{\percent} \\
\FilledCircle{1} & \SI{100}{\percent} \\
\bottomrule
\end{tabular}
\end{document}