ax.set_xticklabels() gives digit-shifted results
#### Code Sample, a copy-pastable example if possible

For the full example, see [here](https://github.com/zhangysh1995/forissues)
```python
solvers = ['z3', 'stp', 'boolector', 'ppbv']
colors = ['g', 'c', 'b', 'r', 'y']
markers = ['x', '^', 's', 'o', '+']

def time_sovled(data):
	df = pd.DataFrame(data)
	rows, columns = df.shape
	X = np.linspace(0, rows, 51)
	X = [int(x) for x in X]
	cumsum = []
	for x in X:
		cumsum.append(df.loc[:x].sum())

	d = pd.DataFrame(cumsum)
	for solver in solvers:
		index = solvers.index(solver)
		ax = d[solver].plot(color=colors[index], marker=markers[index], markersize=3)
                # this may be the cause, but I'm not sure issue #1846.
		ax.set_xticklabels()

```

#### Problem description
Manually assign 'step' to create cumulative sum of the dataframe using df.cumsum() gives new xticks based on my cumsum array. Then ax.set_xticklabels() is used to reset the xticks to the real number of data, but it fails and gives xticks with one digit left shifted ([plots](https://github.com/zhangysh1995/forissues/blob/master/output.png)). Please also refer to this #1846 


#### Expected Output
As in this [plots](https://github.com/zhangysh1995/forissues/blob/master/expected.png), the xticks should equal to the data number.

#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-83-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.20.3
pytest: None
pip: 9.0.1
setuptools: 20.7.0
Cython: None
numpy: 1.13.0
scipy: 0.19.1
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: 0.7.3
lxml: None
bs4: 4.4.1
html5lib: 0.999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
s3fs: None
pandas_gbq: None
pandas_datareader: None

</details>