# Is it possible to overlay a quiver map over a contour map?

**URL:** <https://community.plotly.com/t/is-it-possible-to-overlay-a-quiver-map-over-a-contour-map/22114>\
**Category:** 📊 Plotly Python\
**Created:** [April 10, 2019, 11:05am UTC](https://community.plotly.com/t/is-it-possible-to-overlay-a-quiver-map-over-a-contour-map/22114 "2019-04-10T11:05:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathieuboudreau](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/mathieuboudreau/32/4140_2.png) [@mathieuboudreau](https://community.plotly.com/u/mathieuboudreau)\
**Post date:** [April 10, 2019, 11:05am UTC](https://community.plotly.com/t/is-it-possible-to-overlay-a-quiver-map-over-a-contour-map/22114/1 "2019-04-10T11:05:31Z")

</div>

I tried and was not able to. Quiver map documentations shows how to overlay a scatter plot on it, but my attempt to follow a similar procedure with a contour map wasn’t successful. Just wondering if there’s anything that might be preventing this merging of these two styles of figures.

---

<div class="post-metadata">

**Author:** ![Alexboiboi](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/alexboiboi/32/6420_2.png) [@Alexboiboi](https://community.plotly.com/u/Alexboiboi)\
**Post date:** [April 12, 2019, 4:30pm UTC](https://community.plotly.com/t/is-it-possible-to-overlay-a-quiver-map-over-a-contour-map/22114/2 "2019-04-12T16:30:39Z")

</div>

Hi @mathieuboudreau,  
not sure but is the following related to what you aim to do? -\>

```python
import plotly.figure_factory as ff
import plotly.graph_objs as go
import numpy as np

x,y = np.meshgrid(np.arange(0, 4, .2), np.arange(0, 4, .2))
u = np.cos(x)*y
v = np.sin(x)*y

f = ff.create_quiver(x, y, u, v)
trace1 = f.data[0]
trace2 = go.Contour(
       z=[[10, 10.625, 12.5, 15.625, 20],
          [5.625, 6.25, 8.125, 11.25, 15.625],
          [2.5, 3.125, 5., 8.125, 12.5],
          [0.625, 1.25, 3.125, 6.25, 10.625],
          [0, 0.625, 2.5, 5.625, 10]]
   )
data=[trace1,trace2]
fig = go.FigureWidget(data)
fig

```

image:

 ![21](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/2/28e8c221ea527d44a90475f176e28213d3927222.png)

---

<div class="post-metadata">

**Author:** ![mathieuboudreau](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/mathieuboudreau/32/4140_2.png) [@mathieuboudreau](https://community.plotly.com/u/mathieuboudreau)\
**Post date:** [April 12, 2019, 5:02pm UTC](https://community.plotly.com/t/is-it-possible-to-overlay-a-quiver-map-over-a-contour-map/22114/3 "2019-04-12T17:02:12Z")

</div>

Excellent! That worked!

The part I was missing was getting the trace of the quiver using `trace1 = f.data[0]`, thanks a lot!

 ![05](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/b/b8fbdb19b325aa2085e56cf86bb93df4fa8deaf4.png)
