From 55854fbd7d2dba3c2c8670e005f752d148951e3e Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Thu, 5 Sep 2024 11:10:20 +0100 Subject: [PATCH] lisa.analysis.base: Format plot under-text in sphinx-rst output as code FEATURE Format the argument list diplayed under plots in sphinx-rst output as code rather than plain text. --- lisa/analysis/base.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisa/analysis/base.py b/lisa/analysis/base.py index fe40cedb3..7c05d741a 100644 --- a/lisa/analysis/base.py +++ b/lisa/analysis/base.py @@ -1024,15 +1024,14 @@ class AnalysisHelpers(Loggable, abc.ABC): :align: center :width: 100% - {args_list} + ``{args_list}`` """) elif backend == 'bokeh': idt = ' ' * 4 indent = lambda x: idt + x.replace('\n', '\n' + idt) - title = args_list # Use Sphinx classes to integrate with the theme - title = f'

{title}' + title = f'

{args_list}

' js = '\n'.join(bokeh.embed.components(fig)) # Fixes the exception when using bokeh.io.show() on the same plot. -- GitLab