qcodes/dataset/plotting.py
def _rescale_ticks_and_units(
    ax: matplotlib.axes.Axes,
    data: Sequence[DSPlotData],
    cax: matplotlib.colorbar.Colorbar = None,
) -> None:
    """
    Rescale ticks and units for the provided axes as described in
    :func:`~_make_rescaled_ticks_and_units`
    """
    # for x axis
    if not _is_string_valued_array(data[0]['data']):
        x_ticks_formatter, new_x_label = \
            _make_rescaled_ticks_and_units(data[0])
        ax.xaxis.set_major_formatter(x_ticks_formatter)
        ax.set_xlabel(new_x_label)

    # for y axis
    if not _is_string_valued_array(data[1]['data']):
        y_ticks_formatter, new_y_label = \
            _make_rescaled_ticks_and_units(data[1])
        ax.yaxis.set_major_formatter(y_ticks_formatter)
        ax.set_ylabel(new_y_label)

    # for z aka colorbar axis
    if cax is not None and len(data) > 2:
        if not _is_string_valued_array(data[2]['data']):
            z_ticks_formatter, new_z_label = \
                _make_rescaled_ticks_and_units(data[2])
            cax.set_label(new_z_label)
            cax.formatter = z_ticks_formatter
            cax.update_ticks()

    Rescale ticks and units for the provided axes as described in
    :func:`~_make_rescaled_ticks_and_units`
    
Rescale ticks and units for the provided axes as described in
Rescale ticks and units for the provided axes as described in
def _rescale_ticks_and_units(
    ax: matplotlib.axes.Axes,
    data: Sequence[DSPlotData],
    cax: matplotlib.colorbar.Colorbar = None,
) -> None:
    if not _is_string_valued_array(data[0]['data']):
        x_ticks_formatter, new_x_label = \
            _make_rescaled_ticks_and_units(data[0])
        ax.xaxis.set_major_formatter(x_ticks_formatter)
        ax.set_xlabel(new_x_label)
    if not _is_string_valued_array(data[1]['data']):
        y_ticks_formatter, new_y_label = \
            _make_rescaled_ticks_and_units(data[1])
        ax.yaxis.set_major_formatter(y_ticks_formatter)
        ax.set_ylabel(new_y_label)
    if cax is not None and len(data) > 2:
        if not _is_string_valued_array(data[2]['data']):
            z_ticks_formatter, new_z_label = \
                _make_rescaled_ticks_and_units(data[2])
            cax.set_label(new_z_label)
            cax.formatter = z_ticks_formatter
            cax.update_ticks()
def _rescale_ticks_and_units ( ax : matplotlib . axes . Axes , data : Sequence [ DSPlotData ] , cax : matplotlib . colorbar . Colorbar = None , ) -> None : if not _is_string_valued_array ( data [ 0 ] [ 'data' ] ) : x_ticks_formatter , new_x_label = _make_rescaled_ticks_and_units ( data [ 0 ] ) ax . xaxis . set_major_formatter ( x_ticks_formatter ) ax . set_xlabel ( new_x_label ) if not _is_string_valued_array ( data [ 1 ] [ 'data' ] ) : y_ticks_formatter , new_y_label = _make_rescaled_ticks_and_units ( data [ 1 ] ) ax . yaxis . set_major_formatter ( y_ticks_formatter ) ax . set_ylabel ( new_y_label ) if cax is not None and len ( data ) > 2 : if not _is_string_valued_array ( data [ 2 ] [ 'data' ] ) : z_ticks_formatter , new_z_label = _make_rescaled_ticks_and_units ( data [ 2 ] ) cax . set_label ( new_z_label ) cax . formatter = z_ticks_formatter cax . update_ticks ( )
Rescale ticks and units for the provided axes as described in
Rescale ticks and units for the provided axes as described in
"""
    Rescale ticks and units for the provided axes as described in
    :func:`~_make_rescaled_ticks_and_units`
    """ # for x axis # for y axis # for z aka colorbar axis
ax
matplotlib.axes.Axes
data
Sequence[DSPlotData]
cax
matplotlib.colorbar.Colorbar
func
None