The creation of a secondary axis is documented to accept a tuple of functions to create the transform between the two axes. When created, it passes a numpy array to the declared functions, which may ...
Using a date x-axis that are being autoscaled outside the initial data range due to the added vline then the first (and only the first) data label gets no rotation. That the dates are rotated as in ...