Algorithm internally used for representing tick values

I want to include horizontal and vertical lines at the point where each of the X and Y tick values are represented. The three options that I have in mind are the following ones:

1. Include my custom tick values: this would solve the problem, but I want to preserve the original Plotly tick values as I find them quite convenient for plotting quite different data without having to do many computations to find suitable tick values.
2. Read the tick values with fig.full_figure_for_development().layout: this solves the problem, but it is extremely slow.
3. Knowing the algorithm internally used by plotly to get the tick values given an input dataframe: this is the solution I am aiming, as it is the fastest and more flexible one.

Therefore, my question is, could someone tell me the algorithm used by plotly to plot the output tick values given an input dataframe?