# Ticks and grid for x in Plots.jl

**URL:** <https://discourse.julialang.org/t/ticks-and-grid-for-x-in-plots-jl/1991>\
**Category:** Visualization\
**Created:** [February 8, 2017, 8:45pm UTC](https://discourse.julialang.org/t/ticks-and-grid-for-x-in-plots-jl/1991 "2017-02-08T20:45:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diego\_Javier\_Zea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/diego_javier_zea/32/1858_2.png) [@Diego\_Javier\_Zea](https://discourse.julialang.org/u/Diego_Javier_Zea)\
**Post date:** [February 8, 2017, 8:45pm UTC](https://discourse.julialang.org/t/ticks-and-grid-for-x-in-plots-jl/1991/1 "2017-02-08T20:45:19Z")

</div>

Hi!

Is there a way to delete the vertical grid without deleting the ticks on x?

Best,

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [February 8, 2017, 9:24pm UTC](https://discourse.julialang.org/t/ticks-and-grid-for-x-in-plots-jl/1991/2 "2017-02-08T21:24:36Z")

</div>

I think you can only delete all of the grid, using `grid = false`.

---

<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 9, 2017, 3:24am UTC](https://discourse.julialang.org/t/ticks-and-grid-for-x-in-plots-jl/1991/3 "2017-02-09T03:24:15Z")

</div>

> @mkborregaard: I think you can only delete all of the grid, using grid = false.

Though that might be the _intent_ of Plots.jl, some backends might not respond this way. For example, I know the `grid` keyword will _only_ affect the grid (cannot control tick marks) on InspectDR. (This limitation might end up being a feature in your case).

For other backends, I suppose you could define your own function (ex: `ticks`):

```julia
import MyPlotsWrapperModule: ticks

pyplot()

x=1:10
p = plot(x, x)
pp = display(p) #Get ref to PyPlot "figure"

#Use type from Plots.backend() to dispatch implementation of ticks:
ticks(backend(), xmajor=true, xminor=true, yminor=false)

#Or maybe you could instead dispatch from the PyPlot figure type directly:
ticks(pp, xmajor=true, xminor=true, yminor=false)

```

(Because I would not be surprised if PyPlot backend had control over ticks.)

I guess this is not an ideal solution - but it might be faster than waiting for Plots.jl to support this feature.

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [February 9, 2017, 6:50am UTC](https://discourse.julialang.org/t/ticks-and-grid-for-x-in-plots-jl/1991/4 "2017-02-09T06:50:22Z")

</div>

Sorry for being unclear. `grid = false` does not delete tickmarks. What I meant was, you cannot just remove the vertical gridlines - the horizontal ones will disappear as well.

---

<div class="post-metadata">

**Author:** ![tbreloff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbreloff/32/68_2.png) [@tbreloff](https://discourse.julialang.org/u/tbreloff)\
**Post date:** [February 9, 2017, 2:17pm UTC](https://discourse.julialang.org/t/ticks-and-grid-for-x-in-plots-jl/1991/5 "2017-02-09T14:17:21Z")

</div>

[https://github.com/JuliaPlots/Plots.jl/issues/675](https://github.com/JuliaPlots/Plots.jl/issues/675)

Contributions welcome!
