我喜欢绘制下面的没有颜色的图表,但我需要边框
\documentclass{article}
\usepackage{smartdiagram}
\begin{document}
\smartdiagramset{
planet size=2cm,
distance planet-text=0.1,
distance planet-satellite=2.5cm,
/tikz/connection planet satellite/.append style={<-}
}
\smartdiagram[constellation diagram]{
MaxWalkSAT,max\_tries,max\_flips,target,p, gew.Klaus
}
\end{document}
答案1
像这样?
\documentclass{article}
\usepackage{smartdiagram}
\tikzset{planet/.append style={
draw=blue,thick
},
satellite/.append style={
draw=red
},
}
\begin{document}
\smartdiagramset{
planet size=2cm,
planet color = none,
distance planet-text=0.1,
distance planet-satellite=2.5cm,
/tikz/connection planet satellite/.append style={<-},
satellite fill opacity=0,
}
\smartdiagram[constellation diagram]{
MaxWalkSAT,max\_tries,max\_flips,target,p, gew.Klaus
}
\end{document}
您可以使用以下方式删除填充
planet color = none,
satellite fill opacity=0
然后添加如下样式
\tikzset{planet/.append style={
draw=blue,thick
},
satellite/.append style={
draw=red
},
}
或者直接添加到\smartdiagramset
:
\documentclass{article}
\usepackage{smartdiagram}
\begin{document}
\smartdiagramset{
planet size=2cm,
planet color = none, %%<<-- this
distance planet-text=0.1,
distance planet-satellite=2.5cm,
/tikz/connection planet satellite/.append style={<-},
/tikz/planet/.append style={draw=blue,thick}, %%<<-- this
/tikz/satellite/.append style={draw=red}, %%<<-- this
satellite fill opacity=0, %%<<-- this
}
\smartdiagram[constellation diagram]{
MaxWalkSAT,max\_tries,max\_flips,target,p, gew.Klaus
}
\end{document}
也可以执行以下操作:
\smartdiagramset{
planet size=2cm,
%planet color = none,
distance planet-text=0.1,
distance planet-satellite=2.5cm,
/tikz/connection planet satellite/.append style={<-},
/tikz/planet/.append style={draw=blue,thick,fill=none},
/tikz/satellite/.append style={draw=red,fill=none},
%satellite fill opacity=0,
}
人们也可以改变行星和卫星的形状。
\smartdiagramset{
planet size=2cm,
planet color = none, %%<<-- this
distance planet-text=0.1,
distance planet-satellite=3.5cm,
/tikz/connection planet satellite/.append style={<-},
/tikz/planet/.append style={draw=blue,thick,rectangle,rounded corners=5mm}, %%<<-- this
/tikz/satellite/.append style={draw=red,rectangle,rounded corners=5mm}, %%<<-- this
satellite fill opacity=0, %%<<-- this
}