from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DiagramCls:
"""
| Commands in total: 8
| Subgroups: 0
| Direct child commands: 8
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("diagram", core, parent)
[docs]
def get_crosshair(self) -> bool:
"""
``DISPlay:DIAGram:CROSshair`` \n
Snippet: ``value: bool = driver.display.diagram.get_crosshair()`` \n
If selected, a crosshair is displayed in the diagram area. A crosshair allows you to select a specific data point by its
coordinates.
:return: crosshair: OFF | ON
"""
response = self._core.io.query_str('DISPlay:DIAGram:CROSshair?')
return Conversions.str_to_bool(response)
[docs]
def set_crosshair(self, crosshair: bool) -> None:
"""
``DISPlay:DIAGram:CROSshair`` \n
Snippet: ``driver.display.diagram.set_crosshair(crosshair = False)`` \n
If selected, a crosshair is displayed in the diagram area. A crosshair allows you to select a specific data point by its
coordinates.
:param crosshair: OFF | ON
"""
param = Conversions.bool_to_str(crosshair)
self._core.io.write(f'DISPlay:DIAGram:CROSshair {param}')
[docs]
def get_grid(self) -> bool:
"""
``DISPlay:DIAGram:GRID`` \n
Snippet: ``value: bool = driver.display.diagram.get_grid()`` \n
If selected, a grid is displayed in the diagram area. A grid helps you associate a specific data point to its exact value
on the x- or y-axis.
:return: show: OFF | ON
"""
response = self._core.io.query_str('DISPlay:DIAGram:GRID?')
return Conversions.str_to_bool(response)
[docs]
def set_grid(self, show: bool) -> None:
"""
``DISPlay:DIAGram:GRID`` \n
Snippet: ``driver.display.diagram.set_grid(show = False)`` \n
If selected, a grid is displayed in the diagram area. A grid helps you associate a specific data point to its exact value
on the x- or y-axis.
:param show: OFF | ON
"""
param = Conversions.bool_to_str(show)
self._core.io.write(f'DISPlay:DIAGram:GRID {param}')
[docs]
def get_labels(self) -> bool:
"""
``DISPlay:DIAGram:LABels`` \n
Snippet: ``value: bool = driver.display.diagram.get_labels()`` \n
If selected, labels mark values on the x- and y-axes in specified intervals in the diagram.
:return: show_labels: OFF | ON
"""
response = self._core.io.query_str('DISPlay:DIAGram:LABels?')
return Conversions.str_to_bool(response)
[docs]
def set_labels(self, show_labels: bool) -> None:
"""
``DISPlay:DIAGram:LABels`` \n
Snippet: ``driver.display.diagram.set_labels(show_labels = False)`` \n
If selected, labels mark values on the x- and y-axes in specified intervals in the diagram.
:param show_labels: OFF | ON
"""
param = Conversions.bool_to_str(show_labels)
self._core.io.write(f'DISPlay:DIAGram:LABels {param}')
# noinspection PyTypeChecker
[docs]
def get_style(self) -> enums.DiagramStyle:
"""
``DISPlay:DIAGram:STYLe`` \n
Snippet: ``value: enums.DiagramStyle = driver.display.diagram.get_style()`` \n
Selects the style in which the waveform is displayed.
:return: style: VECTors | DOTS \n
- VECTors: The individual data points are connected by a line.
- DOTS: Only the individual data points are displayed.
"""
response = self._core.io.query_str('DISPlay:DIAGram:STYLe?')
return Conversions.str_to_scalar_enum(response, enums.DiagramStyle)
[docs]
def set_style(self, style: enums.DiagramStyle) -> None:
"""
``DISPlay:DIAGram:STYLe`` \n
Snippet: ``driver.display.diagram.set_style(style = enums.DiagramStyle.DOTS)`` \n
Selects the style in which the waveform is displayed.
:param style: VECTors | DOTS \n
- VECTors: The individual data points are connected by a line.
- DOTS: Only the individual data points are displayed.
"""
param = Conversions.enum_scalar_to_str(style, enums.DiagramStyle)
self._core.io.write(f'DISPlay:DIAGram:STYLe {param}')
[docs]
def get_xfixed(self) -> bool:
"""
``DISPlay:DIAGram:XFIXed`` \n
Snippet: ``value: bool = driver.display.diagram.get_xfixed()`` \n
If enabled, the vertical grid lines remain in their position when the horizontal position is changed. Only the values at
the grid lines are adapted.
:return: xgrid_fixed: OFF | ON
"""
response = self._core.io.query_str('DISPlay:DIAGram:XFIXed?')
return Conversions.str_to_bool(response)
[docs]
def set_xfixed(self, xgrid_fixed: bool) -> None:
"""
``DISPlay:DIAGram:XFIXed`` \n
Snippet: ``driver.display.diagram.set_xfixed(xgrid_fixed = False)`` \n
If enabled, the vertical grid lines remain in their position when the horizontal position is changed. Only the values at
the grid lines are adapted.
:param xgrid_fixed: OFF | ON
"""
param = Conversions.bool_to_str(xgrid_fixed)
self._core.io.write(f'DISPlay:DIAGram:XFIXed {param}')
[docs]
def get_yfixed(self) -> bool:
"""
``DISPlay:DIAGram:YFIXed`` \n
Snippet: ``value: bool = driver.display.diagram.get_yfixed()`` \n
If enabled, the horizontal grid lines remain in their position when the position of the curve is changed. Only the values
at the grid lines are adapted. Fixed horizontal grid lines correspond to the behavior of traditional oscilloscopes.
:return: ygrid_fixed: OFF | ON
"""
response = self._core.io.query_str('DISPlay:DIAGram:YFIXed?')
return Conversions.str_to_bool(response)
[docs]
def set_yfixed(self, ygrid_fixed: bool) -> None:
"""
``DISPlay:DIAGram:YFIXed`` \n
Snippet: ``driver.display.diagram.set_yfixed(ygrid_fixed = False)`` \n
If enabled, the horizontal grid lines remain in their position when the position of the curve is changed. Only the values
at the grid lines are adapted. Fixed horizontal grid lines correspond to the behavior of traditional oscilloscopes.
:param ygrid_fixed: OFF | ON
"""
param = Conversions.bool_to_str(ygrid_fixed)
self._core.io.write(f'DISPlay:DIAGram:YFIXed {param}')
[docs]
def get_fine_grid(self) -> bool:
"""
``DISPlay:DIAGram:FINegrid`` \n
Snippet: ``value: bool = driver.display.diagram.get_fine_grid()`` \n
If selected, the crosshair is displayed as a ruler with scale markers. If disabled, the crosshair is shown as dashed
lines.
:return: show_fine_scale: OFF | ON
"""
response = self._core.io.query_str('DISPlay:DIAGram:FINegrid?')
return Conversions.str_to_bool(response)
[docs]
def set_fine_grid(self, show_fine_scale: bool) -> None:
"""
``DISPlay:DIAGram:FINegrid`` \n
Snippet: ``driver.display.diagram.set_fine_grid(show_fine_scale = False)`` \n
If selected, the crosshair is displayed as a ruler with scale markers. If disabled, the crosshair is shown as dashed
lines.
:param show_fine_scale: OFF | ON
"""
param = Conversions.bool_to_str(show_fine_scale)
self._core.io.write(f'DISPlay:DIAGram:FINegrid {param}')
[docs]
def get_xp_div_label(self) -> bool:
"""
``DISPlay:DIAGram:XPDivlabel`` \n
Snippet: ``value: bool = driver.display.diagram.get_xp_div_label()`` \n
If selected, the time scale value is shown at the diagram bottom instead of the horizontal grid labels. For example, 10
ns/div is shown instead of the values 0, 10, 20, 30... ns.
"""
response = self._core.io.query_str('DISPlay:DIAGram:XPDivlabel?')
return Conversions.str_to_bool(response)
[docs]
def set_xp_div_label(self, shw_per_div_label_x: bool) -> None:
"""
``DISPlay:DIAGram:XPDivlabel`` \n
Snippet: ``driver.display.diagram.set_xp_div_label(shw_per_div_label_x = False)`` \n
If selected, the time scale value is shown at the diagram bottom instead of the horizontal grid labels. For example, 10
ns/div is shown instead of the values 0, 10, 20, 30... ns.
:param shw_per_div_label_x: OFF | ON
"""
param = Conversions.bool_to_str(shw_per_div_label_x)
self._core.io.write(f'DISPlay:DIAGram:XPDivlabel {param}')