I have an image in PNG format. I wanted to draw some arrows over it. These arrows are neither horizontal nor vertical. I am facing problem while assigning the directions to vector.
Below is the image (in which I have drawn the lines from image editor, just to show)
Below is the code to draw an arrow-
\documentclass{article}
\usepackage[percent]{overpic}
\usepackage{xcolor}
\begin{document}
\begin{overpic}{tube}
\put(36,36){\color{green}\vector(2.5,1){50}}
\end{overpic}
\end{document}
Below is the output-
Notice that .5 is getting printed. I have following questions-
- How to align arrows in any direction easily?
- How to draw dotted lines and arrows?
- How to set thickness of the arrow?
Best Answer
The first argument to
\vector
should be a pair of (coprime) integers. However, thepict2e
package removes this restriction and also allows for arbitrary line thickness.The
pict2e
package doesn't support dotted arrows.