TikZ:处理思维导图节点的边框

TikZ:处理思维导图节点的边框

使用以下代码,我在节点周围得到了奇怪的虚线边框。我可以通过 来摆脱它们line width=0pt,但是为什么它们首先应该在那里?另外:我认为即使使用line width=0pt它们也只是略微存在。

\documentclass[a2paper]{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,chains,positioning,calc,trees,mindmap,backgrounds}

\tikzset{
        isNode/.style args = {color#1connected to#2}{concept, concept color=#1, alias=this,
            append after command = {\pgfextra{ \draw[dashed,ultra thick,red] (this)--(#2); }}
        },
        toNode/.style = {concept, concept color=#1},
        isConc/.style = {concept, concept color=orange},
        toConc/.style = {concept, concept color=orange},
        is6/.style = {isNode = color blue connected to othernode}, % use line width=0pt here
        to6/.style = {toNode = blue}
}
\listfiles
\begin{document}

\begin{tikzpicture}
\node[fill=red, circle] (othernode) at (7,7) {adsf};
\path[mindmap, isConc] (0,0cm) node[isConc] {Statistic} [clockwise from=90]
    child[toConc] { node[isConc] {general theory}
        child[to6] { node[is6] {intro} }
        child[to6] { node[is6] {outro} }
    }
    child[toConc] { node[isConc] {distributions} [clockwise from=-30]
        child[to6] { node[is6] {normal} }
        child[to6, sibling angle=-60] { node[is6] {binomial} }
    }  
;
\end{tikzpicture}
\end{document}

在此处输入图片描述

文件列表

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
    tikz.sty    2010/10/13 v2.10 (rcs-revision 1.76)
     pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12)
  pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
  pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1)
  pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18)
 pgfkeys.sty    
 pgfkeys.code.tex
  pgffor.code.tex
    tikz.code.tex
supp-pdf.mkii
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live

答案1

正确答案是添加solid,这样dashed就不会泄漏。感谢 Mark Wibrow 给我这个想法(见评论)。

isNode/.style args = {color#1connected to#2}{
    concept, concept color=#1, alias=this, solid,
    append after command = {\pgfextra{
        \draw[dashed,ultra thick,red] (this)--(#2);
    }}
}

附言:马克,如果你将此作为答案发布,我会接受它并删除此处的帖子。

相关内容