Skip to content
Snippets Groups Projects

use better names in `plot.py`

Merged STEVAN Antoine requested to merge plot-script-better-names into main
1 file
+ 24
1
Compare changes
  • Side-by-side
  • Inline
+ 24
1
@@ -4,6 +4,29 @@ import sys
import matplotlib.pyplot as plt
import argparse
from typing import List, TypedDict
# all fields of a `Measurement` should have the same length
class Measurement(TypedDict):
x: List[float]
y: List[float]
e: List[float]
class LineStyle(TypedDict):
marker: str
type: str
width: int
class Style(TypedDict):
color: str
line: LineStyle
alpha: float
class Graph(TypedDict):
name: str
data: Measurement
style: Style
HELP = """## Example
```nuon
[
@@ -55,7 +78,7 @@ default values have been chosen:
# see [`HELP`]
def plot(
graphs,
graphs: List[Graph],
title: str,
x_label: str,
y_label: str,
Loading