3

The tip of the red angle sign is bigger. How to fix this.

\begin{tikzpicture}[thick, scale = 1.5, transform shape]
\coordinate (origo) at (0,0); 
\draw (0,0) ellipse (2cm and 1cm);
\draw [->] (0,0) -- (-0.9,-0.9);
  \node (a) {};
  \node (A)[below left = 0.7cm and 0.7cm of a] {$x$};
 \draw [->, color = blue] (0,0) -- (0.5,-0.98);  
   \node (B)[below right = 0.8cm and 0.15cm of a] {$x_1,x_2$};
\pic [draw = red, text = blue, ->, "$\Phi$", angle eccentricity = 1.5] {angle = A--origo--B};
\end{tikzpicture}

Angle between two lines.

2

You have some mismatch in definitions of coordinates. Try the following:

\documentclass[border=3mm,tikz]{standalone}
\usetikzlibrary{angles, quotes, positioning}

    \begin{document}
\begin{tikzpicture}[thick, scale = 1.5, transform shape]
    \coordinate (O) at (0,0);
    \coordinate[label=below  left:$x$]          (A) at (-0.9,-0.9);
    \coordinate[label=below right:{$x_1,x_2$}]  (B) at (0.5,-0.98);
\draw (O) ellipse (2cm and 1cm);
    \draw [->] (O) -- (A);
    \draw [->] (O) -- (B);
\pic [draw=red, text=blue,->, "$\Phi$", angle eccentricity=1.5] {angle = A--O--B};\end{tikzpicture}
    \end{document}

enter image description here

The cause your problem is fact, that the center of nodes (a) and (b), which you consider in pic are not in line with your arrows. Node "b", is wider, so the coordinate is move slightly to right. To nullify this offset, I select real coordinates (which are nodes with zero size), and for coordinate labels use label option in coordinate.

| improve this answer | |
  • Thanks for a quick reply. It solved the problem but I still couldn't figure out what is wrong in my approach. – user48319 Jan 29 '16 at 23:39
  • See added explanation in answer. – Zarko Jan 29 '16 at 23:53
1

A luamplib alternative, just for comparison. Compile with lualatex.

enter image description here

\documentclass[border=5mm]{standalone}
\usepackage{unicode-math}
\setmathfont{Tex Gyre Termes Math}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
  beginfig(1);
    path ellipse, arc, arrow[]; 
    ellipse = fullcircle xscaled 4cm yscaled 2cm;
    arrow1 = origin -- point 5.2 of ellipse;
    arrow2 = origin -- point 6.3 of ellipse;
    arc = ellipse scaled 1/2 cutbefore arrow1 cutafter arrow2;
    draw ellipse;
    drawarrow arrow1;
    drawarrow arrow2 withcolor .67 blue;
    drawarrow arc    withcolor .53 red;
    label.llft("$x$",        point 1 of arrow1);
    label.lrt ("$x_1, x_2$", point 1 of arrow2);
    label.bot ("$Φ$",        point 1/2 of arc) withcolor .67 blue;
  endfig;
\end{mplibcode}
\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy