I have a figure and would like to highlight a particular region of that figure with a circle or an ellipse as shown in figure:

It is important that the line of the circle or ellipse are thick. How do I control the location of the circle, to up, down, right or left?

Thanks a lot!

With TikZ:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{positioning,shapes}
\begin{document}

\begin{center}
\begin{tikzpicture}
\node(a){\includegraphics{circle.png}};
\node at(a.center)[draw, red,line width=3pt,ellipse, minimum width=118pt, minimum height=50pt,rotate=-28,yshift=-48pt]{};
\end{tikzpicture}
\end{center}

\end{document}


I used red so that you can see where my ellipse is with respect to the original ellipse. You can fine-tune the positioning via shifts, rotate, etc.

Here is a way by using \tikz for the ellipse, and then \stackinset to overlay it on the image. Arguments #2 and #4 to \stackinset are the offsets from the left, bottom of the image (horizontal offsets can be with respect to l, c, or r and vertical t, c, or b), while the 4 arguments to \solidcirc are the rotation angle, line thickness, and the x and y radii of the ellipse.

\documentclass{article}
\usepackage{stackengine,tikz,graphicx}
\newcommand\solidcirc[4][0]{\rotatebox{#1}{\tikz{\draw[line width=#2] (0,0)

• @WendellFialho Yes. You can nest them, wherein the first inset becomes argument #6 of the outer inset. If you do many insets at once, it renders more quickly if you save intermediate results in a box, and use the box as argument #6. The \savestack mechanism utilizes this boxed mechanism. E.g. \savestack\inbox{\stackinset{}{}{}{}{}{}}. Then, \stackinset{}{}{}{}{}{\inbox}. – Steven B. Segletes Mar 21 at 0:14
• @WendellFialho This, answer, tex.stackexchange.com/questions/171483/…, shows nested \stackinsets... 5 insets over the base image. – Steven B. Segletes Mar 21 at 2:04
• @WendellFialho \documentclass{article} \usepackage{stackengine,tikz} \newcommand\solidcirc[4][0]{\rotatebox{#1}{\tikz{\draw[line width=#2] (0,0) arc [x radius=#3,y radius=#4,start angle=0,end angle=360];}}} \begin{document} \stackinset{l}{.5in}{b}{.3in}{\textcolor{red}{\solidcirc[30]{3pt}{2.4}{1.0}}}{\stackinset{l}{1in}{b}{.8in}{\textcolor{blue}{\solidcirc[-30]{3pt}{2.8}{1.0}}}{\includegraphics{example-image}}} \end{document} – Steven B. Segletes Mar 21 at 2:10