\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}[scale=1.5,cap ,color= blue]
% grid
\draw[very thin,color = green,step = 0.5 cm, opacity= 0.9](0,0) grid (4, 4);
% axis
\draw[->] [blue, thick] ( 0,0) --( 4,0) node[right] {$x$};
\draw[->] [blue, thick] ( 0,0) --( 0,4) node[above] {$y$};
% how to change the arrow tip style at specific path
% how to set up unique arrow head as a decoration at (1,0) coordinate and at (0,1)
\draw[decoration={markings, mark=at position 0.5 with {\arrow [ ultra thick] {>}}},
postaction={decorate}]
(0,0)--( 2,0);
\draw[decoration={markings, mark=at position 0.5 with {\arrow [ ultra thick] {>}}},
postaction={decorate}]
(0,0)--( 0,2);
\end{tikzpicture}
\end{document}
[Tex/LaTex] Specific arrow tip style for specific path
tikz-pgf
Related Question
- TikZ-PGF Arrows – Repositioning and Resizing Arrow Tip on Circular Path
- TikZ3 Arrow Tips – Specify ‘No Arrow’ or ‘Shift Tip’ Options
- [Tex/LaTex] Package pgf Error: Unknown arrow tip kind ‘latex’’ \path (
- [Tex/LaTex] Drawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawing
- TikZ Arrows – How to Split Path Minus Arrow Tip Evenly
Best Answer
You can replace the
>
with the desired type of arrow. Below I used thelatex
andstealth
type of arrow in the first image. Alternatively, you can leave the>
and apply\tikzset{>=latex}
which will replace all>
with alatex
style arrow as in the second image:Code: