# Plotting trajectories

**URL:** <https://discourse.julialang.org/t/plotting-trajectories/7111>\
**Category:** General Usage\
**Created:** [November 17, 2017, 12:33am UTC](https://discourse.julialang.org/t/plotting-trajectories/7111 "2017-11-17T00:33:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Romero\_Azzalini](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/romero_azzalini/32/10325_2.png) [@Romero\_Azzalini](https://discourse.julialang.org/u/Romero_Azzalini)\
**Post date:** [November 17, 2017, 12:33am UTC](https://discourse.julialang.org/t/plotting-trajectories/7111/1 "2017-11-17T00:33:25Z")

</div>

Hi,  
I wanted to plot trajectories around a planet and therefore cut out a circle in the middle of the plot (PyPlot). I tried it with fill, but I can still see the trajectories ☹

 ![testtraj](https://global.discourse-cdn.com/julialang/original/3X/7/1/71bcc059800416a2d27e7144e97c63ebfb18c624.png)

Also I want to plot 3D trajectories and a 2D density map with PyPlot. Has anyone an idea how to do that?

Best,  
Hannes

---

<div class="post-metadata">

**Author:** ![JackDevine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jackdevine/32/1048_2.png) [@JackDevine](https://discourse.julialang.org/u/JackDevine)\
**Post date:** [November 17, 2017, 8:54am UTC](https://discourse.julialang.org/t/plotting-trajectories/7111/2 "2017-11-17T08:54:08Z")

</div>

I think that the `zorder` keyword argument should help you:

```julia
julia> using PyPlot

julia> xx = linspace(0, 2pi)
0.0:0.1282282715750936:6.283185307179586

julia> plot([0, 2], "b", zorder=1)
1-element Array{PyCall.PyObject,1}:
 PyObject <matplotlib.lines.Line2D object at 0x129216b10>

julia> fill(sin.(xx), cos.(xx), "k", zorder=2)
1-element Array{PyCall.PyObject,1}:
 PyObject <matplotlib.patches.Polygon object at 0x1293a7f10>

```

---

<div class="post-metadata">

**Author:** ![Romero\_Azzalini](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/romero_azzalini/32/10325_2.png) [@Romero\_Azzalini](https://discourse.julialang.org/u/Romero_Azzalini)\
**Post date:** [November 19, 2017, 2:47am UTC](https://discourse.julialang.org/t/plotting-trajectories/7111/3 "2017-11-19T02:47:24Z")

</div>

yes, thanks!

---

<div class="post-metadata">

**Author:** ![benibilme](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@benibilme](https://discourse.julialang.org/u/benibilme)\
**Post date:** [May 11, 2023, 10:41pm UTC](https://discourse.julialang.org/t/plotting-trajectories/7111/4 "2023-05-11T22:41:46Z")

</div>

Hello, I desperately need non python solution to plot vehicle trajectories on a map. Do you have any suggestions as of 2023?
