File "/usr/lib/python3.13/site-packages/matplotlib/lines.py", line 207, in _mark_every_path
    return Path(verts[markevery], _slice_or_none(codes, markevery))
                ~~~~~^^^^^^^^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/user/software/Salvadanaio/gui/bgexecutor.py", line 14, in wrapped_task
    task()
    ~~~~^^
  File "/home/user/software/Salvadanaio/gui/formhandler.py", line 176, in doit
    store_cb(i)
    ~~~~~~~~^^^
  File "/home/user/software/Salvadanaio/gui/indicatorsview.py", line 232, in store
    self.maybe_draw_indicators()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/user/software/Salvadanaio/gui/indicatorsview.py", line 248, in maybe_draw_indicators
    self._draw_indicators(self.indicators)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/user/software/Salvadanaio/gui/indicatorsview.py", line 278, in _draw_indicators
    self.graph.plot(indicators)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/home/user/software/Salvadanaio/gui/charting/portfoliogrowth.py", line 87, in plot
    self.canvas.draw()
    ~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/matplotlib/backends/backend_tkagg.py", line 10, in draw
    super().draw()
    ~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/matplotlib/backends/backend_agg.py", line 382, in draw
    self.figure.draw(self.renderer)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/matplotlib/artist.py", line 94, in draw_wrapper
    result = draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python3.13/site-packages/matplotlib/artist.py", line 71, in draw_wrapper
    return draw(artist, renderer)
  File "/usr/lib/python3.13/site-packages/matplotlib/figure.py", line 3257, in draw
    mimage._draw_list_compositing_images(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        renderer, self, artists, self.suppressComposite)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/matplotlib/image.py", line 134, in _draw_list_compositing_images
    a.draw(renderer)
    ~~~~~~^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/matplotlib/artist.py", line 71, in draw_wrapper
    return draw(artist, renderer)
  File "/usr/lib/python3.13/site-packages/matplotlib/axes/_base.py", line 3210, in draw
    mimage._draw_list_compositing_images(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        renderer, self, artists, self.get_figure(root=True).suppressComposite)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/matplotlib/image.py", line 134, in _draw_list_compositing_images
    a.draw(renderer)
    ~~~~~~^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/matplotlib/artist.py", line 71, in draw_wrapper
    return draw(artist, renderer)
  File "/usr/lib/python3.13/site-packages/matplotlib/lines.py", line 853, in draw
    subsampled = _mark_every_path(
        markevery, tpath, affine, self.axes)
  File "/usr/lib/python3.13/site-packages/matplotlib/lines.py", line 209, in _mark_every_path
    raise ValueError(
        f"markevery={markevery!r} is iterable but not a valid numpy "
        f"fancy index") from err
ValueError: markevery=[datetime.date(2020, 4, 1), datetime.date(2020, 5, 1), datetime.date(2020, 6, 1), datetime.date(2020, 7, 1), datetime.date(2020, 9, 1), datetime.date(2020, 10, 1), datetime.date(2020, 12, 1), datetime.date(2021, 2, 1), datetime.date(2021, 3, 1), datetime.date(2021, 4, 1), datetime.date(2021, 6, 1), datetime.date(2021, 7, 1), datetime.date(2021, 9, 1), datetime.date(2021, 10, 1), datetime.date(2021, 11, 1), datetime.date(2021, 12, 1), datetime.date(2022, 2, 1), datetime.date(2022, 3, 1), datetime.date(2022, 4, 1), datetime.date(2022, 6, 1), datetime.date(2022, 7, 1), datetime.date(2022, 8, 1), datetime.date(2022, 9, 1), datetime.date(2022, 11, 1), datetime.date(2022, 12, 1), datetime.date(2023, 2, 1), datetime.date(2023, 3, 1), datetime.date(2023, 5, 1), datetime.date(2023, 6, 1), datetime.date(2023, 8, 1), datetime.date(2023, 9, 1), datetime.date(2023, 11, 1), datetime.date(2023, 12, 1), datetime.date(2024, 2, 1), datetime.date(2024, 3, 1), datetime.date(2024, 4, 1), datetime.date(2024, 5, 1), datetime.date(2024, 7, 1), datetime.date(2024, 8, 1), datetime.date(2024, 10, 1), datetime.date(2024, 11, 1)] is iterable but not a valid numpy fancy index
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/matplotlib/lines.py", line 207, in _mark_every_path
    return Path(verts[markevery], _slice_or_none(codes, markevery))
                ~~~~~^^^^^^^^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.13/tkinter/__init__.py", line 2068, in __call__
    return self.func(*args)
           ~~~~~~~~~^^^^^^^
  File "/usr/lib/python3.13/tkinter/__init__.py", line 862, in callit
    func(*args)
    ~~~~^^^^^^^
  File "/usr/lib/python3.13/site-packages/matplotlib/backends/_backend_tk.py", line 274, in idle_draw
    self.draw()
    ~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/matplotlib/backends/backend_tkagg.py", line 10, in draw
    super().draw()
    ~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/matplotlib/backends/backend_agg.py", line 382, in draw
    self.figure.draw(self.renderer)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/matplotlib/artist.py", line 94, in draw_wrapper
    result = draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python3.13/site-packages/matplotlib/artist.py", line 71, in draw_wrapper
    return draw(artist, renderer)
  File "/usr/lib/python3.13/site-packages/matplotlib/figure.py", line 3257, in draw
    mimage._draw_list_compositing_images(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        renderer, self, artists, self.suppressComposite)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/matplotlib/image.py", line 134, in _draw_list_compositing_images
    a.draw(renderer)
    ~~~~~~^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/matplotlib/artist.py", line 71, in draw_wrapper
    return draw(artist, renderer)
  File "/usr/lib/python3.13/site-packages/matplotlib/axes/_base.py", line 3210, in draw
    mimage._draw_list_compositing_images(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        renderer, self, artists, self.get_figure(root=True).suppressComposite)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/matplotlib/image.py", line 134, in _draw_list_compositing_images
    a.draw(renderer)
    ~~~~~~^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/matplotlib/artist.py", line 71, in draw_wrapper
    return draw(artist, renderer)
  File "/usr/lib/python3.13/site-packages/matplotlib/lines.py", line 853, in draw
    subsampled = _mark_every_path(
        markevery, tpath, affine, self.axes)
  File "/usr/lib/python3.13/site-packages/matplotlib/lines.py", line 209, in _mark_every_path
    raise ValueError(
        f"markevery={markevery!r} is iterable but not a valid numpy "
        f"fancy index") from err
ValueError: markevery=[datetime.date(2020, 4, 1), datetime.date(2020, 5, 1), datetime.date(2020, 6, 1), datetime.date(2020, 7, 1), datetime.date(2020, 9, 1), datetime.date(2020, 10, 1), datetime.date(2020, 12, 1), datetime.date(2021, 2, 1), datetime.date(2021, 3, 1), datetime.date(2021, 4, 1), datetime.date(2021, 6, 1), datetime.date(2021, 7, 1), datetime.date(2021, 9, 1), datetime.date(2021, 10, 1), datetime.date(2021, 11, 1), datetime.date(2021, 12, 1), datetime.date(2022, 2, 1), datetime.date(2022, 3, 1), datetime.date(2022, 4, 1), datetime.date(2022, 6, 1), datetime.date(2022, 7, 1), datetime.date(2022, 8, 1), datetime.date(2022, 9, 1), datetime.date(2022, 11, 1), datetime.date(2022, 12, 1), datetime.date(2023, 2, 1), datetime.date(2023, 3, 1), datetime.date(2023, 5, 1), datetime.date(2023, 6, 1), datetime.date(2023, 8, 1), datetime.date(2023, 9, 1), datetime.date(2023, 11, 1), datetime.date(2023, 12, 1), datetime.date(2024, 2, 1), datetime.date(2024, 3, 1), datetime.date(2024, 4, 1), datetime.date(2024, 5, 1), datetime.date(2024, 7, 1), datetime.date(2024, 8, 1), datetime.date(2024, 10, 1), datetime.date(2024, 11, 1)] is iterable but not a valid numpy fancy index



        print(indicators.riskfree_growth)
        riskfree1000 = [t[1] for t in indicators.riskfree_growth]
        mm = [t[0] for t in indicators.riskfree_growth if t[0].day == 1]
        
        self.ax.clear()
        self.ax.plot(dates, refgrowth,
                     label='Reference', color="black", linestyle='solid')#, marker='o')
        self.ax.plot(dates, benchgrowth,
                     label='Benchmark', color="blue", linestyle='solid')#, marker='s')
        self.ax.plot(dates, riskfree1000, color="orange", linestyle='-', marker='s',
                     markevery=mm, label='Risk free')
        # self.ax.set_xlabel('Date')
        self.ax.set_ylabel('Growth')
        self.ax.legend(loc="upper left")
        self.ax.grid(True)
        # Y axis bounds
        series = refgrowth + benchgrowth


help me fix this code