from typing import List
from typing import Tuple


def plot_sequence(ax, trajectory:List[Tuple], colour:str='black', 
                    size:int=10, *args, **kwargs):
    """
    Plots a trajectory as a sequence of numbers

    Args:
        ax (plt.axes): Axes on which to plot
        trajectory (List[Tuple]): Trajectory of state indices
        colour (str, optional): Colour of the numbers. Defaults to 'black'.
        size (int, optional): Size of the numbers.

    """
                    
    ## Iteratively plot numbers.
    for i in range(len(trajectory)):

        x, y = trajectory[i]
        
        ## Plot.
        ax.text(x-0.25, y-0.25, str(i+1), color=colour, size=size, *args, **kwargs)

    return ax