The following script
import numpy as np`
import plotly.plotly as py
import plotly.graph_objs as go
from plotly.graph_objs import *
from plotly.offline import download_plotlyjs, init_notebook_mode, iplot
init_notebook_mode(connected = True)
rand = np.random.randn(100)
trace = go.Histogram(name = "distance of overpass from Rome's station",
x = rand,
autobinx = False,
xbins = dict(start = 0.1,
size = 10,
end = rand.max())
)
data = [trace]
fig = go.Figure(data = data)
iplot(fig)
is running in Jupyter notebook with Python 3 kernel.
The problem is that whatever is the the change in the attributes of nbins
(start, size, end) the histogram’s bins don’t cange in the plot.
I wrote this script as an example, so I did it for Python’s Plotly, but I’d actually like to perform a histogram for pandas module that is with the use of dataframe’s column as x variable.