Placing ticklabels via tickvals and ticktext

In [1]:
import numpy as np
from plotly.offline import download_plotlyjs, init_notebook_mode,  iplot, plot
init_notebook_mode(connected=True)
In [2]:
x=np.linspace(0, 90000, 40)
y= 200+100*np.random.rand(40)
In [4]:
tickvals=[3461+k*6923 for k in range(13)]
In [5]:
ticktext=['0-3460', '3460-10K', '10K-17K','17K-24K', '24K-31K', '31K-38K', '38K-45K', '45K-51K', '51K-58K',
         '58K-65K', '65K-72K', '72K-79K', '79K-86K']
In [6]:
data=[dict(x=x,
           y=y,
          mode='markers+lines',
          marker=dict(color='blue', size=6),
        
          )]
In [7]:
layout=dict(width=800, height=600, autosize=False,
           xaxis=dict(zeroline=False,
                      showline=True, 
                      tickmode='array',
                      tickvals=tickvals, 
                      ticktext=ticktext,
                      ticklen=4, mirror=True),
           yaxis=dict(showline=True, mirror=True),
            hovermode='closest'
           )
In [8]:
fig=dict(data=data, layout=layout)
iplot(fig)