mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
refactor: review response for MR !31
This commit is contained in:
@ -181,12 +181,12 @@ class PlotSettings(BaseModel):
|
|||||||
Global settings for plotting affecting mostly visuals.
|
Global settings for plotting affecting mostly visuals.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
background_color (str): Color of the plot background.
|
background_color (str): Color of the plot background. Default is black.
|
||||||
axis_width (Optional[int]): Width of the plot axes.
|
axis_width (Optional[int]): Width of the plot axes. Default is 2.
|
||||||
axis_color (Optional[str]): Color of the plot axes.
|
axis_color (Optional[str]): Color of the plot axes. Default is None.
|
||||||
num_columns (int): Number of columns in the plot layout.
|
num_columns (int): Number of columns in the plot layout. Default is 1.
|
||||||
colormap (str): Colormap to be used.
|
colormap (str): Colormap to be used. Default is magma.
|
||||||
scan_types (bool): Indicates if the configuration is for different scan types.
|
scan_types (bool): Indicates if the configuration is for different scan types. Default is False.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
background_color: Literal["black", "white"] = "black"
|
background_color: Literal["black", "white"] = "black"
|
||||||
|
@ -10,8 +10,7 @@ from qtpy.QtCore import Signal as pyqtSignal
|
|||||||
from qtpy.QtCore import Slot as pyqtSlot
|
from qtpy.QtCore import Slot as pyqtSlot
|
||||||
from qtpy.QtWidgets import QApplication, QMessageBox
|
from qtpy.QtWidgets import QApplication, QMessageBox
|
||||||
|
|
||||||
from bec_widgets.utils import Colors, Crosshair
|
from bec_widgets.utils import Colors, Crosshair, yaml_dialog
|
||||||
from bec_widgets.utils.yaml_dialog import load_yaml
|
|
||||||
from bec_widgets.validation import MonitorConfigValidator
|
from bec_widgets.validation import MonitorConfigValidator
|
||||||
from bec_widgets.utils.bec_dispatcher import bec_dispatcher
|
from bec_widgets.utils.bec_dispatcher import bec_dispatcher
|
||||||
|
|
||||||
@ -821,7 +820,7 @@ if __name__ == "__main__": # pragma: no cover
|
|||||||
config = json.loads(args.config)
|
config = json.loads(args.config)
|
||||||
elif args.config_file is not None:
|
elif args.config_file is not None:
|
||||||
# Load config from file
|
# Load config from file
|
||||||
config = load_yaml(args.config_file)
|
config = yaml_dialog.load_yaml(args.config_file)
|
||||||
else:
|
else:
|
||||||
config = CONFIG_SIMPLE
|
config = CONFIG_SIMPLE
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user