# Plotting arrows in 2d and 3d?

**URL:** <https://community.plotly.com/t/plotting-arrows-in-2d-and-3d/243>\
**Category:** plotly.js\
**Created:** [December 16, 2015, 7:14pm UTC](https://community.plotly.com/t/plotting-arrows-in-2d-and-3d/243 "2015-12-16T19:14:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paultpearson](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@paultpearson](https://community.plotly.com/u/paultpearson)\
**Post date:** [December 16, 2015, 7:14pm UTC](https://community.plotly.com/t/plotting-arrows-in-2d-and-3d/243/1 "2015-12-16T19:14:50Z")

</div>

Does plotly have native support for arrows? For instance, in 2d is there an arrow object which plots an arrow shaft (line segment) together with an arrow tip (a filled triangle)? In 3d is there an arrow object which plots an arrow shaft (line segment or cylinder) with an arrow tip (a filled cone)? If not, what are alternate solutions? Obviously, it’s possible to manually construct an arrow from three line segments, but this would be rather laborious. Is it possible to write a javascript function arrow(s,t) that has input points for the source (s = [a,b] or s = [a,b,c]) and target (t = [c,d] or t = [d,e,f]) and would generate the data to plot an arrow from s to t?

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [December 16, 2015, 7:26pm UTC](https://community.plotly.com/t/plotting-arrows-in-2d-and-3d/243/2 "2015-12-16T19:26:29Z")

</div>

> **[Text and Annotations](https://plotly.com/javascript/text-and-annotations/)**
>
> How to add text labels and annotations to D3.js-based plots in javascript.
