code: def plot_ts(
      df, df_timestamps, df_timestamp_name, df_targets, df_description
  ):
      template = "plotly_white"
      traces = {}
      for target in df_targets:
          traces[target] = go.Scatter(
              name=target,
              x=df_timestamps,
              y=df[target],
              mode="lines",
              line=dict(color="rgb(0,0,0)"),
          )
  
      for target in df_targets:
          fig = go.Figure(data=[traces[target]])
  
          fig.update_layout(template=template)
          fig.update_layout(showlegend=False)
          fig.update_layout(hovermode="x")
          fig.update_layout(title_text="[target] %s" % (target))
  
          fig.update_xaxes(title_text=df_timestamp_name)
          fig.update_layout(xaxis_range=None)
          fig.update_yaxes(title_text=target)
  
          annotations = []
          annotations.append(
              dict(
                  xref="paper",
                  yref="paper",
                  x=-0.02,
                  y=-0.6,
                  text=df_description,
                  font=dict(
                      family="Arial", size=10, color="rgb(150,150,150)"
                  ),
                  showarrow=False,
              )
          )
  
          fig.update_layout(annotations=annotations)
      return fig
  
file_path: AIX360/examples/tsice/plots.py
imports: from typing import Union
  import numpy
  import pandas
  from sklearn.linear_model import LinearRegression
label_desc: Use image node_id 5 for calling a global function with example usage: plot_ts(df, df_timestamps, df_timestamp_name, df_targets, df_description) and returns: fig