feat(datavis): ✨ tweak plotting to use commas as decimal point
This commit is contained in:
parent
8d80a97f9a
commit
da07b320a4
2 changed files with 3 additions and 2 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
@ -14,6 +14,7 @@
|
||||||
"latex-workshop.synctex.afterBuild.enabled": true,
|
"latex-workshop.synctex.afterBuild.enabled": true,
|
||||||
"latex-workshop.view.outline.sync.viewer": true,
|
"latex-workshop.view.outline.sync.viewer": true,
|
||||||
"conventionalCommits.scopes": [
|
"conventionalCommits.scopes": [
|
||||||
"tex"
|
"tex",
|
||||||
|
"datavis"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -60,7 +60,7 @@ def read_ltspice_file(filename, plot_config):
|
||||||
if lre.search("^Step Information: ([^=]*)=([\d\.\+-]+)(\w?) \(Step: .*\)$", line):
|
if lre.search("^Step Information: ([^=]*)=([\d\.\+-]+)(\w?) \(Step: .*\)$", line):
|
||||||
step_param = plot_config.get('step_parameter', lre.last_match[1]);
|
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', '')}";
|
unit = f"{lre.last_match[3]}{plot_config.get('step_unit', '')}";
|
||||||
|
|
||||||
current_step = "{value:>6s} {unit:s}".format(value=value, unit=unit);
|
current_step = "{value:>6s} {unit:s}".format(value=value, unit=unit);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue