Hi all,

I decided I wanted to start using plotly, because I was very impressed by its features. I’ve already done a lot of work in matplotlib so I was hoping I could convert some of the graphs I’ve already made into plotly. However I’ve been running into a problem converting bar charts where if my xaxis consists of strings, then the bar labels get converted into numbers. Is there a way to keep the string labels that i’m missing??

Thanks in advance to for any help that can ben given!!

An example of this problem Is shown below

y = [3, 10, 7, 5]

x = [‘hi’, ‘hello’, ‘yo’, ‘gday’]

mpl_fig = plt.figure(figsize=(40,20))

ax = mpl_fig.add_subplot(111)

ax.bar(x, y, color = ‘b’, alpha = 0.8)

plt.xticks(rotation=90, fontsize = 25)

plt.yticks(fontsize = 25)

plt.ylabel(‘x test’, fontsize = 32)

plt.xlabel(‘y test’, fontsize = 32)

plotly_fig = tls.mpl_to_plotly(mpl_fig)

plotly.offline.iplot(plotly_fig)

producing the graph below