Skip to content
Snippets Groups Projects
schedule.py 36.9 KiB
Newer Older
  • Learn to ignore specific revisions
  • Oscar Gustafsson's avatar
    Oscar Gustafsson committed
            return fig
    
        def _repr_svg_(self) -> str:
    
            Generate an SVG of the schedule. This is automatically displayed in e.g.
            Jupyter Qt console.
    
            fig, ax = plt.subplots()
            self._plot_schedule(ax)
    
            buffer = io.StringIO()
            fig.savefig(buffer, format="svg")
    
            return buffer.getvalue()