# Error with quiver: "unexpected vi type Nothing for quiver: nothing"

**URL:** https://discourse.julialang.org/t/error-with-quiver-unexpected-vi-type-nothing-for-quiver-nothing/77060
**Category:** General Usage
**Tags:** plots
**Created:** [February 25, 2022, 12:29pm UTC](https://discourse.julialang.org/t/error-with-quiver-unexpected-vi-type-nothing-for-quiver-nothing/77060 "2022-02-25T12:29:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![leopdsf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leopdsf/32/31008_2.png) [@leopdsf](https://discourse.julialang.org/u/leopdsf)
#### Post date: [February 25, 2022, 12:29pm UTC](https://discourse.julialang.org/t/error-with-quiver-unexpected-vi-type-nothing-for-quiver-nothing/77060/1 "2022-02-25T12:29:31Z")

</div>

Greetings, everybody!  
I’m having a problem using quiver from Plots.jl. As I understood, I have to provide 2 arrays that will state the initial coordinate of the vector, and other 2 that will state its final position. So I’m doing this:

```julia
using HypergeometricFunctions
using Plots

k(x,z) = -4*x*(1+x^2+z^2-2*x)^(-1)

f1(x,z) = (1+x^2+z^2-2*x)^(-3/2)*((1+x)*_₂F₁(1/2,1/2,1,k(x,z)) +
(x^2-z^2-1)*_₂F₁(3/2,3/2,2,k(x,z))/(1+x^2+z^2-2^x))

f2(x,z) = (1+x^2+z^2-2*x)^(-3/2)*(-2*z*_₂F₁(1/2,1/2,1,k(x,z))+
2*x*z*_₂F₁(3/2,3/2,2,k(x,z))/(1+x^2+z^2-2^x))

N = ceil(Int,(4/0.1+1)^2)
Ex = zeros(N)
Ez = zeros(N)
vx = zeros(N)
vz = zeros(N)

i=1
for x in -2:0.1:2
    for z in -2:0.1:2
        vx[i] = x
        vz[i] = z
        Ex[i] = (1/4*π)*f1(x,z)
        Ez[i] = (1/4*π)*f2(x,z)
        i+=1
    end
end

quiver(vx,vz,quiver(Ex,Ez))

```

Whith that I receive the following error message:

```julia
unexpected vi type Nothing for quiver: nothing

```

Does anyone knows what is wrong?

---

<div class="post-metadata">

### Author: ![BeastyBlacksmith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beastyblacksmith/32/4741_2.png) [@BeastyBlacksmith](https://discourse.julialang.org/u/BeastyBlacksmith)
#### Post date: [February 27, 2022, 12:11am UTC](https://discourse.julialang.org/t/error-with-quiver-unexpected-vi-type-nothing-for-quiver-nothing/77060/2 "2022-02-27T00:11:53Z")

</div>

> [@leopdsf](#):
>
> `quiver(vx,vz,quiver(Ex,Ez))`

You are missing an equal sign

```julia
quiver(vx,vz,quiver=(Ex,Ez))

```

Though, `Ex` and `Ez` need to be the displacements from `vx` and `vy` and not the endpoints.
