feat(datavis): tweak plotting to use commas as decimal point

This commit is contained in:
Xaseiresh 2024-05-07 16:46:04 +02:00
parent 8d80a97f9a
commit da07b320a4
2 changed files with 3 additions and 2 deletions

View file

@ -14,6 +14,7 @@
"latex-workshop.synctex.afterBuild.enabled": true,
"latex-workshop.view.outline.sync.viewer": true,
"conventionalCommits.scopes": [
"tex"
"tex",
"datavis"
]
}

View file

@ -60,7 +60,7 @@ def read_ltspice_file(filename, plot_config):
if lre.search("^Step Information: ([^=]*)=([\d\.\+-]+)(\w?) \(Step: .*\)$", line):
step_param = plot_config.get('step_parameter', lre.last_match[1]);
value = f"{round(float(lre.last_match[2]), 2)}";
value = f"{round(float(lre.last_match[2]), 2):.2f}".replace('.', ',');
unit = f"{lre.last_match[3]}{plot_config.get('step_unit', '')}";
current_step = "{value:>6s} {unit:s}".format(value=value, unit=unit);