def plot_sentiment_analysis(df):
    """Generates a bar plot with the sentiment scores of each sentence.

    Parameters
    ----------
    df : pandas.DataFrame
        The DataFrame to be plotted.

    """

    # Only take into account scores between -10 and 10.
    df = df[(df["score"] <= 10) & (df["score"] >= -10)]

    # We will make bars with a score below zero yellow and
    # bars with a score above zero blue.
    colors = np.array([(0.811, 0.913, 0.145)]*len(df["score"]))
    colors[df["score"] >= 0] = (0.529, 0.870, 0.972)

    yticks_labels = [str(i) for i in range(-12, 12, 2)]
    plt.yticks(np.arange(-12, 12, 2), yticks_labels)

    plt.bar(df.index, df["score"], color=colors, linewidth=0)
    plt.xlabel("Sentence Number")
    plt.ylabel("Score")
    plt.title("Sentiment Analysis")
    plt.savefig("sentiment_analysis.png", facecolor="#5C0E10")
Generates a bar plot with the sentiment scores of each sentence.

    Parameters
    ----------
    df : pandas.DataFrame
        The DataFrame to be plotted.

    
scripts/step3.py