# Plotting with GR broken

**URL:** <https://discourse.julialang.org/t/plotting-with-gr-broken/84036>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [July 11, 2022, 6:32am UTC](https://discourse.julialang.org/t/plotting-with-gr-broken/84036 "2022-07-11T06:32:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [July 11, 2022, 6:32am UTC](https://discourse.julialang.org/t/plotting-with-gr-broken/84036/1 "2022-07-11T06:32:33Z")

</div>

Hi all,

I was trying this code (yesterday it was fine):

```julia
using Plots, LaTeXStrings
gr()

f(x) = (x^3 - 1) / (x-1)

plot(
    f, 0, 6,
    legend=false, 
    framestyle=:origin,
    yticks=(-3:3, ["$i" for i in 0:6])
)

```

but today it got error:  
**Error showing value of type Plots.Plot{Plots.GRBackend}:**  
**ERROR: MethodError: no method matching deleteat!(::UnitRange{Int64}, ::Int64)**  
**Closest candidates are:**  
\*\* deleteat!(::Vector, ::Integer) at ~/julia-1.7.3/share/julia/base/array.jl:1421\*\*  
\*\* deleteat!(::Vector, ::Any) at ~/julia-1.7.3/share/julia/base/array.jl:1468\*\*  
\*\* deleteat!(::BitVector, ::Integer) at ~/julia-1.7.3/share/julia/base/bitarray.jl:949\*\*

![Capture d’écran_2022-07-11_13-32-04](https://global.discourse-cdn.com/julialang/original/3X/9/0/90f878986a622534fb7886cbcf8b5afa3ae28c30.png)

---

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [July 11, 2022, 6:36am UTC](https://discourse.julialang.org/t/plotting-with-gr-broken/84036/2 "2022-07-11T06:36:13Z")

</div>

Turns out I just need to change the plot command:  
` plot(f,-10,10, label=L"\frac{x^3 - 1}{x-1}", legend=:outertop)`

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [July 11, 2022, 9:14am UTC](https://discourse.julialang.org/t/plotting-with-gr-broken/84036/3 "2022-07-11T09:14:41Z")

</div>

You might need to use `collect(-3:3)` for your `yticks`.
