I would like to plot a 3d vector field (e.g. a couple of points with arrows attached), with some basic interactivity (rotatate, zoom, pan). What are my options to do this in julia? Are there some example codes with 3d vector fields? Is it possible with Plots.jl?

# Plot 3d vector field

**jw3126**#3

Thanks it works! Here is an example for those who may have the same question:

```
using PyPlot
pygui(true)
fig = figure()
ax = fig[:gca](projection="3d")
N = 10
x,y,z,u,v,w = [randn(N) for _ in 1:6]
ax[:quiver](x,y,z, u,v,w)
```

**ramonz**#4

Hello.

I have a small problem with quiver in 3d. When setting the axes scale I am unable to set the z axis. x and y axes work well but somehow the 3d projection does not work with z.

Here is the same example as before

using PyPlot

pygui(true)

fig = figure()

ax = fig:gca

N = 10

x,y,z,u,v,w = [randn(N) for i in 1:6]

ax[:quiver](x,y,z, u,v,w)

axis([-5, 5, -5, 5])

This seems to work, however:

using PyPlot

pygui(true)

fig = figure()

ax = fig:gca

N = 10

x,y,z,u,v,w = [randn(N) for i in 1:6]

ax[:quiver](x,y,z, u,v,w)

axis([-5, 5, -5, 5, -5, 5])

This throws the following error:

ValueError(u’v must contain [xmin xmax ymin ymax]’,) so only x and y axes are defined

Can anybody help?

**crstnbr**#5

Please quote code blocks with backticks (and without code errors).

```
using PyPlot
pygui(true)
fig = figure()
ax = fig[:gca](projection="3d")
N = 10
x,y,z,u,v,w = [randn(N) for _ in 1:6]
ax[:quiver](x,y,z, u,v,w)
xlim([0.0, 1.0])
ylim([0.0, 1.0])
zlim([0.0, 1.0])
```

works for me.

**sdanisch**#7

Makie can also do this:

http://makie.juliaplots.org/stable/examples-arrows.html#Arrows-3D-1

**sdanisch**#9

just installed 1.0.2 and it seems to work fine on Makie#master AbstractPlotting#master… what version did you install?

**oliver**#10

```
[ Info: Precompiling Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a]
ERROR: LoadError: could not open file /home/oliver/.julia/packages/GLFW/pkSlg/deps/deps.jl
ERROR: LoadError: LoadError: Failed to precompile GLFW [f7f18e0c-5ee9-5ccd-a5bf-e8befd85ed98] to /home/oliver/.julia/compiled/v1.0/GLFW/n8HlT.ji.
ERROR: Failed to precompile Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a] to /home/oliver/.julia/compiled/v1.0/Makie/iZ1Bl.ji.
```