Python plotly: remove empty spaces from bar chart

Viewed 1575

I'm plotting a bar chart with the python library plotly, but there's whitespace between the bars which I don't want.

import plotly
from plotly import graph_objs as go

xvals = [u'12.09', u'12.10', u'12.11', u'12.12', u'12.13', u'13.01', u'13.02']

yvals = [115, 69, 165, 98, 157, 126, 60]

data = [go.Bar(x=xvals,y=yvals)]

plotly.offline.plot(data)

produces this:

enter image description here

How can I bunch the bars together and get rid of the white space?

1 Answers

try making the graph logarithmic by giving the xaxis in the layout equal to 'log'

xaxis=dict(
type="log"
)

Related