bearcart
bearcart copied to clipboard
String xticks
http://code.shutterstock.com/rickshaw/examples/x_axis.html gives an example on how strings can be set as xticks.
So for a df/series like:
In [50]: s = pd.Series(np.random.randn(5), index=['a', 'b', 'c', 'd', 'e'])
In [51]: s
Out[51]:
a -1.291530
b -0.158646
c 0.713441
d 0.637185
e 1.581175
dtype: float64
We could do the following:
- See that index is string
- Create temp index as range(len(index))
- Create a mapping b/w temp index and original string index
- Use mapping to update x ticks as shown in the example linked above