2

I'm producing a schematic Nyquist plot, and I want to create an arc between the x-axis and a straight line, which should be denoted PM (phase margin). I use the intersections library to find the intersections between a circle path around the origin and the negative x-axis and the straight line. So far so good. But when I want to place a node on the \draw[bend right] path, the text is way too large (see pic) and it looks like it's anchored to the origin, not the path drawn between (P1) and (P2). I suspect that the circle path used to generate the intersections are the source of my problem. My intention is to produce a PM that is perpendicular left of the midway of the arc: node[sloped,left,midway] {$\PM$}; What's going on here?

I have removed a lot of stuff in the plot to produce the MWE. The \PM code works like a charm other places in the plot, just not at the bend right path.

MWE:

\documentclass{standalone}
\usepackage{tikz, amsmath}
\usetikzlibrary{intersections, calc}
\newcommand{\GM}{\text{GM}}
\newcommand{\PM}{\text{PM}}
\begin{document}
\begin{tikzpicture}[scale = 3.5,
    every path/.style = {thin, font=\footnotesize, >={stealth}},
    ]

    % Generating axes
    \draw[step=0.5cm, gray, very thin] (-1.2,-1.2) grid (1.2,1.2) ;
        \draw[dashed, name path=circle] (0,0) circle[radius=1] ;
        \draw[->, name path=Re] (-1.2,0) -- (1.2,0) node[right] {$\Re$} coordinate(x axis) ;
        \draw[->] (0,-1.2) -- (0,1.2) node[above] {$\Im$} coordinate(y axis) ;
        \foreach \x/\xtext in {-1/,-.5/,.5/\frac{1}{2}, 1}
            \draw[xshift=\x cm] (0pt,1pt) -- (0pt,-1pt) node[below,fill=white] {$\xtext$};
        \foreach \y/\ytext in {-1, -.5/-\frac{1}{2}, .5/\frac{1}{2}, 1}
            \draw[yshift=\y cm] (1pt,0pt) -- (-1pt,0pt) node[left,fill=white] {$\ytext$};

    % Curved line
    \draw[name path=line] (0,0) .. controls (-0.25,0.5) and (-1,0) .. (-1.0,-1.0) 
        node[at end, above right] {$L(i\omega)$};

    % Straight line
    \path[name intersections={of=line and circle}];
    \draw[->, name path=PM] (0,0)--(intersection-1) ;

    % Generating coordinates for the arc
    \path[name path=circle] circle (0.3) ;
    \path[name intersections={of=circle and Re}] ;
    \coordinate (P1) at (intersection-2) ;

    \path[name intersections={of=circle and PM}] ;
    \coordinate (P2) at (intersection-1) ;

    % Drawing the arc    
    \draw[bend right] (P1) to (P2) node[left,sloped,midway] {$\PM$} ;
\end{tikzpicture}
\end{document}

Result:

enter image description here

Holene
  • 6,920
  • 1
    Try \draw[bend right] (P1) to node[above,sloped,midway,rotate=180] {$\PM$} (P2); See http://tex.stackexchange.com/questions/39793/using-midway-to-label-a-curved-path-at-its-centre – Torbjørn T. Apr 26 '13 at 08:26
  • @TorbjørnT. This one did the trick: \draw[bend right] (P1) to node[left,sloped,midway, rotate=90] {$\PM$} (P2); Thank you! Sorry for the dupe. – Holene Apr 26 '13 at 08:29
  • No worries, it isn't always easy to find such duplicates. – Torbjørn T. Apr 26 '13 at 08:31

0 Answers0