1

I have in tikz included this image, and want to draw arrows from each "section". The arrows should be pointing to the right side.. is that possible?..

Is there a native way in which the included image can be divided into section (6 equally divided sections), and draw arrows out from them in tikz?..

\begin{tikzpicture}
    \node[inner sep=0pt] (img) at (0,0)
        {\includegraphics[width=0.1\textwidth]{img/specto_snap.png}};
\end{tikzpicture}

enter image description here

What I have done now, is created the section with lines in paint, and included the image, is it possible to alter the included in image in tikz? or is this the solution?

2

With some help from Drawing on an image with TikZ:

enter image description here

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node [inner sep=0pt,above right] (img) at (0,0){\includegraphics[width=0.1\textwidth]{img/specto_snap}};
\begin{scope}[x=(img.south east),y=(img.north west)]
    % draw dividing lines
    \foreach \y in {1,...,5}
       \draw [red,ultra thick,dashed] (0,\y/6) -- (1,\y/6);

    % draw arrows from middle of each section
    \begin{scope}[-stealth,thick]
        \draw  (0.5,1/12) -- ++(1,0) node[right] {foo};
        \draw  (0.5,3/12) -- ++(1,0) node[right] {bar};
        \draw  (0.5,5/12) -- ++(1,0) node[right] {baz};
        \draw  (0.5,7/12) -- ++(1,0) node[right] {foobar};
        \draw  (0.5,9/12) -- ++(1,0) node[right] {foobaz};
        \draw  (0.5,11/12) -- ++(1,0) node[right] {foobarbaz};
    \end{scope}
\end{scope}
\end{tikzpicture}
\end{document}
1
\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{graphicx}
\begin{document}
\begin{tikzpicture}
  \node[inner sep=0pt] (Img) {\includegraphics[width=3cm,height=10cm]{example-image}};
  %% Lines
  \foreach \y in {1,...,5}{
    \draw[very thick] ($(Img.south west)!\y/6!(Img.north west)$) -- ($(Img.south east)!\y/6!(Img.north east)$);
  }
  %% Arrows
  \foreach \ylabel [count=\y] in {one,two,three,four,five,six}{
    \draw[very thick,-latex] ($(Img.south)!\y/6-1/12!(Img.north)$) -- +(5,0) node[right]{\ylabel}; 
  }
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.