0

I'm surprised this hasn't come up before, but I've found nothing on either tex.sx, Google, or in the TikZ/pgf manual. (Perhaps I haven't looked hard enough.)

I'd like to draw some very simple illustrations (graphs, really) in TikZ, and I'd like for the arrows connecting nodes to vary in thickness from start to finish; put another way I'd like to vary the line width of a path while the path is being stroked.

I would've thought instead of

\draw[->, line width=1pt] (0,0) node[anchor=east]{A} -- (1,0) node[anchor=west]{B};

I could write something along the lines of

\draw[->, line width start=3pt, line width end=1pt] (0,0) node[anchor=east]{A} -- (1,0) node[anchor=west]{B};

but no such feature seems to exist. What's the best way of doing this? The exact way the line width varies is not overly important (a linear change is fine; bonus brownie points for something that is visually appealing though).

chsk
  • 3,667
  • 1
    I guess it came up before: https://tex.stackexchange.com/a/14295, https://tex.stackexchange.com/q/471204, just to give you a few examples. Of course for linear paths you only need a triangle. –  Apr 13 '20 at 12:54
  • Thanks. Hmm. Those solutions are complicated, complex, arcane, and (to me) almost impossible to understand to the point where I'd feel confident adapting them to my needs and expecting them to (still) work. Guess I'll have to try something else. (In the meantime I'm surprised that TikZ doesn't have this feature, say as a path decoration.) – chsk Apr 16 '20 at 11:42

0 Answers0