# How do I offset the origin of one axis in PyPlot Plot3D

**URL:** <https://discourse.julialang.org/t/how-do-i-offset-the-origin-of-one-axis-in-pyplot-plot3d/1757>\
**Category:** General Usage\
**Created:** [January 29, 2017, 11:20am UTC](https://discourse.julialang.org/t/how-do-i-offset-the-origin-of-one-axis-in-pyplot-plot3d/1757 "2017-01-29T11:20:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phillefjonk](https://avatars.discourse-cdn.com/v4/letter/p/f04885/32.png) [@phillefjonk](https://discourse.julialang.org/u/phillefjonk)\
**Post date:** [January 29, 2017, 11:20am UTC](https://discourse.julialang.org/t/how-do-i-offset-the-origin-of-one-axis-in-pyplot-plot3d/1757/1 "2017-01-29T11:20:43Z")

</div>

I am doing a 3D plot with Plot3D

```julia
using PyPlot

< code that computes x1, x2, x3 >

plot3D(x1,x2,x3)
xlim(6378237-1000,6378237+1000)
ylim(-1000,1000)
zlim(0,1000)

```

Instead of setting the limits of the x-axis with xlim() I would like to set the origin of the x-axis to be 6378237. Which Julia PyPlot command does this?

(It is surprisingly difficult to find the answer on the web)

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [January 29, 2017, 4:32pm UTC](https://discourse.julialang.org/t/how-do-i-offset-the-origin-of-one-axis-in-pyplot-plot3d/1757/2 "2017-01-29T16:32:03Z")

</div>

This SO thread may be of help to you if I understood your question correctly:

> <https://stackoverflow.com/questions/4694478/center-origin-in-matplotlib>

Every command you type in matplotlib/pyplot should work as it is with PyPlot.jl. If it doesn’t, you can open an issue on GitHub.
