# Problem with the xticks property when saving a plot, which worked a few days ago

**URL:** <https://discourse.julialang.org/t/problem-with-the-xticks-property-when-saving-a-plot-which-worked-a-few-days-ago/44207>\
**Category:** Visualization\
**Tags:** plotting, pyplot\
**Created:** [August 3, 2020, 5:00pm UTC](https://discourse.julialang.org/t/problem-with-the-xticks-property-when-saving-a-plot-which-worked-a-few-days-ago/44207 "2020-08-03T17:00:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wg030](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wg030/32/12944_2.png) [@wg030](https://discourse.julialang.org/u/wg030)\
**Post date:** [August 3, 2020, 5:00pm UTC](https://discourse.julialang.org/t/problem-with-the-xticks-property-when-saving-a-plot-which-worked-a-few-days-ago/44207/1 "2020-08-03T17:00:56Z")

</div>

Hey guys,  
I have a problem with a piece of plotting code, that previously worked like a charm, but creates an error due to some of the latest updates now. Here is a MWE:

```julia
using Plots
using PyPlot

x = 0:100
y = x

pyplot()
pygui( true)
plt = Plots.plot( x, y, xticks=( 0:10:100, 0:10:100))

Plots.savefig( plt, "test.png")

```

I have already figured out that the problem is caused by xticks, but I don’t know how to fix it.  
The error this code creates is

> LoadError: MethodError: no method matching getindex(::Int64, ::UnitRange{Int64})

---

<div class="post-metadata">

**Author:** ![wg030](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wg030/32/12944_2.png) [@wg030](https://discourse.julialang.org/u/wg030)\
**Post date:** [August 4, 2020, 10:12am UTC](https://discourse.julialang.org/t/problem-with-the-xticks-property-when-saving-a-plot-which-worked-a-few-days-ago/44207/2 "2020-08-04T10:12:36Z")

</div>

As this seems to be a bug I have now opened an issue on github at the Plots repository.  
However if anyone knew a solution or workaround, an answer would still be appreciated.
