Skip to content

Commit

Permalink
Benchcomp scatterplots: quote axis labels (#3097)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tautschnig authored Mar 20, 2024
1 parent ec2b8b3 commit f8c30d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tools/benchcomp/benchcomp/visualizers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tools/benchcomp/test/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f8c30d9

Please sign in to comment.