0

I have drawn contour plot using plotly package in R. Additionally, I have used QUIVER function using pracma package to generate velocity vectors. Now I would like to overlay velocity vectors on top of the contour plot. How can I do that? Since I have not found any QUIVER function in r-plotly, so used another package.

plot_ly(x=x,y=y,z=z,type="contour")   # contour plot using plotly package
quiver(x,y,u,v)                       # vector plot using pracma package

Now I would like to show both on the same plot.

wibeasley
  • 5,000
  • 3
  • 34
  • 62
Ashkar
  • 1
  • 1
  • 1
    Please share your code – jrswgtr Dec 11 '18 at 15:27
  • example code: 1) plot_ly(x=x,y=y,z=z,type="contour") # contour plot using plotly package 2) quiver(x,y,u,v) # vector plot using pracma package now I would like to show both on the same plot. – Ashkar Dec 11 '18 at 20:53
  • Welcome to Stack Overflow. Read and include features from [How to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example?rq=1), especially the part about reproducing and pasting your data. – wibeasley Dec 31 '18 at 18:40

0 Answers0