How to normalize a histogram with Danfo.js?

196 views Asked by At

I need to get normalized histogram. So in Danfo notebooks I tried syntax like this:

s = new dfd.Series([1, 3, 2, 2, 2, 6, 10, 10, 34, 40, 51, 90, 90, 90, 90, 1, 3, 2, 2, 2, 6, 10, 10, 34, 40, 51, 90, 90, 90, 90, 1, 3, 2, 2, 2, 6, 10, 10, 34, 40, 51, 90, 90, 90, 90, 1, 3, 2, 2, 2, 6, 10, 10, 34, 40, 51, 90, 90, 90, 90, 1, 3, 2, 2, 2, 6, 10, 10, 34, 40, 51, 90, 90, 90, 90, 75]) 
s.plot(this_div()).hist({histnorm: 'probability', layout: {title: 'Normalized Histogram'}})

But it looks like danfo.js ignores Plotly histnorm trace attribute.

So the question is: Is it possible to use Plotly trace attributes with danfojs's plots, and if it's possible then what is correct syntax for that?

0

There are 0 answers