def plot_front_position_pltly(df, bSave, dirname):
    """Plot the height vs. time of the freezing front using plotly
    """
    import plotly
    import plotly.graph_objs as go
    import plotly.io as pio
    data = []
    max_height = 0
    for i in range(len(df['ExpName'].unique())):
        data.append(go.Scatter(x=df[df['ExpName'] == df['ExpName'].unique()
            [i]]['Time'], y=df[df['ExpName'] == df['ExpName'].unique()[i]][
            'Height'], name=df['ExpName'].unique()[i]))
        max_height = max(max_height, max(df[df['ExpName'] == df['ExpName'].
            unique()[i]]['Height']))
    fig = go.Figure({'data': data, 'layout': go.Layout(width=800, height=
        500, xaxis=dict(title='Time (s)', linecolor='black', linewidth=2,
        mirror=True), yaxis=dict(title='Height of front (mm)', range=(0, 
        1.05 * max_height), linecolor='black', linewidth=2, mirror=True),
        showlegend=True)})
    plotly.offline.plot(fig, auto_open=True)
    if bSave:
        pio.write_image(fig, dirname + '/' + 'FrontHeight.pdf')
