# Automatic adjustment of ticks when zooming with Plots.jl

**URL:** <https://discourse.julialang.org/t/automatic-adjustment-of-ticks-when-zooming-with-plots-jl/5055>\
**Category:** Visualization\
**Tags:** pyplot, plots, plotlyjs, inspectdr\
**Created:** [July 25, 2017, 11:37am UTC](https://discourse.julialang.org/t/automatic-adjustment-of-ticks-when-zooming-with-plots-jl/5055 "2017-07-25T11:37:58Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![MA\_Laforge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ma_laforge/32/385_2.png) [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Post date:** [February 13, 2021, 4:07pm UTC](https://discourse.julialang.org/t/automatic-adjustment-of-ticks-when-zooming-with-plots-jl/5055/4 "2021-02-13T16:07:19Z")

</div>

I had forgotten about this post. That’s great to hear @dalarev!

### FYI: How to get it to work with PyPlot

Apparently, this behaviour _ **can** _ be achieved with PyPlot if you set options:

```julia-auto
pyplot(ticks=:native)

```

or if you set the option in your plot command:

```julia-auto
plot(x, y, [other args here], ticks=:native)

```

I checked with the maintainers of Plots.jl, and it appears the intent of `ticks=:native` is indeed to use PyPlot’s own internal programming to display ticks (which auto-adjusts as you zoom):  
 → [https://github.com/JuliaPlots/Plots.jl/issues/3263](https://github.com/JuliaPlots/Plots.jl/issues/3263)

### PyPlot bug warning

Having said that, there still appears to be a bug with how Plots.jl controls the PyPlot backend. Specifically, it has issues displaying tick labels when `ticks=:native`, for some reason:  
 → [pyplot(ticks=:native) doesn't use native ticks · Issue #3284 · JuliaPlots/Plots.jl · GitHub](https://github.com/JuliaPlots/Plots.jl/issues/3284)

---

_[View the full topic](https://discourse.julialang.org/t/automatic-adjustment-of-ticks-when-zooming-with-plots-jl/5055)._
