from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal.Types import DataType
from ....Internal.ArgSingleList import ArgSingleList
from ....Internal.ArgSingle import ArgSingle
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AxisCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("axis", core, parent)
[docs]
def set(self, diagram_name: str, source: enums.SignalSource, xsource: bool) -> None:
"""
``LAYout:SIGNal:AXIS`` \n
Snippet: ``driver.layout.signal.axis.set(diagram_name = 'abc', source = enums.SignalSource.AJ1, xsource = False)`` \n
Creates an XY-diagram by adding a second waveform to a diagram.
:param diagram_name: String with the name of the diagram where the waveform is added.
:param source: Waveform to be added, see 'Waveform parameter'
:param xsource: If on, the added waveform is assigned to the x-axis. If off, it is assigned to the y-axis.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('diagram_name', diagram_name, DataType.String), ArgSingle('source', source, DataType.Enum, enums.SignalSource), ArgSingle('xsource', xsource, DataType.Boolean))
self._core.io.write_with_opc(f'LAYout:SIGNal:AXIS {param}'.rstrip())