Legitimacy is also deeply tied to "ideological switching." When a caretaker government radically differs from the ousted president, the transition is far more likely to be branded a "neo-coup" by the public and opposition.
Below, two ways to visualize each case: