2

enter image description here

Why is the tangent not really horizontal?

     \documentclass{article}
     \usepackage{tikz}
     \usepackage{circuitikz}
     \usepackage{pst-solides3d}
     \usetikzlibrary{shapes,decorations}
     \usetikzlibrary{positioning,arrows}
     \tikzset{
     state/.style={circle,draw,minimum size=6ex},
     arrow/.style={-latex, shorten >=1ex, shorten <=1ex}}
     \begin{document}
     \begin{tikzpicture}  
     \node[name=D,draw,circle,inner sep=3pt,fill=gray!50] at (17,.5) {};
     %d
     \draw
     (D.north) to (16.65,.65)
     (D.south) to (16.65,.35)
     ;
     \draw[latex-]
     (16.75,.65) to (16.75,1);
     \draw[latex-]
     (16.75,.35) to (16.75,0);
     \node at (16.45,.5) {$d$};
     \end{tikzpicture}
     \end{document}

enter image description here

papiri
  • 71
  • 1
  • 2
  • Welcome to TeX.SX! The image is twice here;-) –  Sep 07 '14 at 22:26
  • 1
    It's all to do with line width. The position D.north is on the very outside of the circle, so the middle of your incident line is aligned with the outside of the circle line. There are a couple of ways to solve this depending on how technical you are prepared to be. – Andrew Stacey Sep 07 '14 at 22:32
  • (I think we've seen this before, but for a rectangle node shape. The solutions for that ought to be applicable here, but my search skills are sadly lacking.) – Andrew Stacey Sep 07 '14 at 22:33
  • Holy.... I always forget this gold badge thingy. Please let us know if it is not a duplicate, though adding outer sep=0mm would solve it. – percusse Sep 07 '14 at 22:35
  • I almost got to post this ;(: You could use relative locations: \documentclass[tikz]{standalone} \usepackage{circuitikz} \usetikzlibrary{positioning} \tikzset{ state/.style={circle,draw,minimum size=6ex}, arrow/.style={-latex, shorten >=1ex, shorten <=1ex}} \begin{document} \begin{tikzpicture} \node[name=D,draw,circle,inner sep=3pt,fill=gray!50] at (17,.5) {}; %d \draw (D.north) -- +(-.35,0) (D.south) -- +(-.35,0) ; \draw[latex-] (16.75,.65) to (16.75,1); \draw[latex-] (16.75,.35) to (16.75,0); \node at (16.45,.5) {$d$}; \end{tikzpicture} \end{document} – cfr Sep 07 '14 at 22:37

0 Answers0