I want to either update a figure or make new ones in a loop

The candle stick plot in plotly makes it too hard to read smaller detail so I am trying to plot it out with less points per plot but I have no idea how to either update the figure or to plot a new figure for each loop

for index, row in lookForwardData.iloc[i:j].iterrows():

  #cut sections of the data by row to then plot
  tempDataforPlot=lookForwardData.iloc[i:j,:]

  fig1 = go.Figure(data=[go.Candlestick(x=tempDataforPlot["Date"],
                  open=tempDataforPlot["Open"],
                  high=tempDataforPlot["High"],
                  low=tempDataforPlot["Low"],
                  close=tempDataforPlot["Close"])])

  fig1.update_traces(go.Scatter(x=tempDataforPlot['Date'], y = tempDataforPlot['Swing Price'], mode = 'lines',name="Swing"))

  i=+50#200
  j=+50#200
  if j+200>fLDlength:
    j=-1
  
  
  input("Press Enter to continue...")
  
  
  fig1.show()