From 40ef6878119ead64de252c64fda583b6befaa3a9 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Wed, 20 Mar 2024 09:53:56 +0000 Subject: [PATCH] Benchcomp scatterplots: quote axis labels Mermaid does not accept `@` characters in axis labels when the labels aren't in quotes. (Seen when trying to run CBMC's upcoming benchcomp suite.) Note: the title must not be quoted, else the quotes themselves will be rendered. --- tools/benchcomp/benchcomp/visualizers/__init__.py | 4 ++-- tools/benchcomp/test/test_regression.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/benchcomp/benchcomp/visualizers/__init__.py b/tools/benchcomp/benchcomp/visualizers/__init__.py index 0215ebd02bdc..8de4a9f130b6 100644 --- a/tools/benchcomp/benchcomp/visualizers/__init__.py +++ b/tools/benchcomp/benchcomp/visualizers/__init__.py @@ -250,8 +250,8 @@ def _get_template(): %%{init: { "quadrantChart": { "titlePadding": 15, "xAxisLabelPadding": 20, "yAxisLabelPadding": 20, "quadrantLabelFontSize": 0, "pointRadius": 2, "pointLabelFontSize": 2 }, "themeVariables": { "quadrant1Fill": "#FFFFFF", "quadrant2Fill": "#FFFFFF", "quadrant3Fill": "#FFFFFF", "quadrant4Fill": "#FFFFFF", "quadrant1TextFill": "#FFFFFF", "quadrant2TextFill": "#FFFFFF", "quadrant3TextFill": "#FFFFFF", "quadrant4TextFill": "#FFFFFF", "quadrantInternalBorderStrokeFill": "#FFFFFF" } } }%% quadrantChart title {{ metric }} - x-axis {{ d["scaled_variants"][metric][0] }} - y-axis {{ d["scaled_variants"][metric][1] }} + x-axis "{{ d["scaled_variants"][metric][0] }}" + y-axis "{{ d["scaled_variants"][metric][1] }}" quadrant-1 1 quadrant-2 2 quadrant-3 3 diff --git a/tools/benchcomp/test/test_regression.py b/tools/benchcomp/test/test_regression.py index 54cf134eed79..c277797162e0 100644 --- a/tools/benchcomp/test/test_regression.py +++ b/tools/benchcomp/test/test_regression.py @@ -466,8 +466,8 @@ def test_markdown_results_table(self): %%{init: { "quadrantChart": { "titlePadding": 15, "xAxisLabelPadding": 20, "yAxisLabelPadding": 20, "quadrantLabelFontSize": 0, "pointRadius": 2, "pointLabelFontSize": 2 }, "themeVariables": { "quadrant1Fill": "#FFFFFF", "quadrant2Fill": "#FFFFFF", "quadrant3Fill": "#FFFFFF", "quadrant4Fill": "#FFFFFF", "quadrant1TextFill": "#FFFFFF", "quadrant2TextFill": "#FFFFFF", "quadrant3TextFill": "#FFFFFF", "quadrant4TextFill": "#FFFFFF", "quadrantInternalBorderStrokeFill": "#FFFFFF" } } }%% quadrantChart title runtime - x-axis variant_1 - y-axis variant_2 + x-axis "variant_1" + y-axis "variant_2" quadrant-1 1 quadrant-2 2 quadrant-3 3