How does plotly.js determine the tick position when the tickmode is "auto"?

When plotting the boxplot, I wonder how exactly does plotly.js determine the tick positions when the tickmode is set to be “auto”?

For example, in this plot (https://codepen.io/anon/pen/rvLRNX), the number of ticks on the yaxis is 5, while in this case (https://codepen.io/anon/pen/MGexYR), the number is 7.

It’s a pretty complex algorithm. I won’t attempt to put it into words. But if you’re interested, the source code is here:

Thank you for the reply!

I wonder if there a way to extract the y-axis labels after the plot is drawn?

In this example of boxplot drawn by javascript plotly (https://codepen.io/anon/pen/deOdeB), I wonder if there a way to extract the y-axis labels from the plot. The expected outcome is [0, 0.2, 0.4, 0.6, 0.8, 1].