# How to not plot axis ticks on top and right in Plots.jl with GR backend?

**URL:** <https://discourse.julialang.org/t/how-to-not-plot-axis-ticks-on-top-and-right-in-plots-jl-with-gr-backend/112345>\
**Category:** Visualization\
**Tags:** question, plots\
**Created:** [March 31, 2024, 5:47am UTC](https://discourse.julialang.org/t/how-to-not-plot-axis-ticks-on-top-and-right-in-plots-jl-with-gr-backend/112345 "2024-03-31T05:47:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![singularitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/singularitti/32/17678_2.png) [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Post date:** [March 31, 2024, 5:47am UTC](https://discourse.julialang.org/t/how-to-not-plot-axis-ticks-on-top-and-right-in-plots-jl-with-gr-backend/112345/1 "2024-03-31T05:47:56Z")

</div>

This is the inverse question for: [Axis ticks on top and right](https://discourse.julialang.org/t/axis-ticks-on-top-and-right/44416)

`plot` with `framestyle=:box` used to not put axis ticks on top and right, but after [Feature request: plot axes and ticks on all four sides · Issue #2218 · JuliaPlots/Plots.jl · GitHub](https://github.com/JuliaPlots/Plots.jl/issues/2218), this seems to be fixed. However, what should I do to recover the old-style behavior? Is there an option like `:semibox` or something?

```julia
plot(1:10, 1:10, framestyle=:box)

```

 ![](https://global.discourse-cdn.com/julialang/original/3X/d/6/d659f4b213082d0c4abe3901e9a6f5c7a8d4244a.jpeg)

---

<div class="post-metadata">

**Author:** ![singularitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/singularitti/32/17678_2.png) [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Post date:** [March 31, 2024, 5:51am UTC](https://discourse.julialang.org/t/how-to-not-plot-axis-ticks-on-top-and-right-in-plots-jl-with-gr-backend/112345/2 "2024-03-31T05:51:51Z")

</div>

Similar: [Remove top or bottom axis in :box plot](https://discourse.julialang.org/t/remove-top-or-bottom-axis-in-box-plot/100897)

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [March 31, 2024, 8:40am UTC](https://discourse.julialang.org/t/how-to-not-plot-axis-ticks-on-top-and-right-in-plots-jl-with-gr-backend/112345/3 "2024-03-31T08:40:48Z")

</div>

There is the `:semi` style:  
`plot(1:10, 1:10, framestyle=:semi)`

---

<div class="post-metadata">

**Author:** ![singularitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/singularitti/32/17678_2.png) [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Post date:** [March 31, 2024, 9:21am UTC](https://discourse.julialang.org/t/how-to-not-plot-axis-ticks-on-top-and-right-in-plots-jl-with-gr-backend/112345/4 "2024-03-31T09:21:47Z")

</div>

Hi, I am aware of the `:semi` option, however, the top and bottom frames seem to have different widths than the other two. And I couldn’t find any option to control the width of the frame.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/7/979e1ba7a6b51fa7a0078711364b84fe5d7ef797.jpeg)

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [March 31, 2024, 9:26am UTC](https://discourse.julialang.org/t/how-to-not-plot-axis-ticks-on-top-and-right-in-plots-jl-with-gr-backend/112345/5 "2024-03-31T09:26:00Z")

</div>

Try:

```julia
p = plot(1:10, 1:10, widen=false)
vline!([xlims(p)[2]], lc=:black, lw=2)
hline!([ylims(p)[2]], lc=:black, lw=2)

```

---

<div class="post-metadata">

**Author:** ![singularitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/singularitti/32/17678_2.png) [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Post date:** [March 31, 2024, 6:35pm UTC](https://discourse.julialang.org/t/how-to-not-plot-axis-ticks-on-top-and-right-in-plots-jl-with-gr-backend/112345/6 "2024-03-31T18:35:06Z")

</div>

Thanks! It looks better. But could there be a specific option to do this in a more straightforward way?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/e/7e1caff429778e6a673d0cc607568c844546d08b.png)
