qcodes/dataset/plotting.py
def _make_rescaled_ticks_and_units(
    data_dict: DSPlotData,
) -> Tuple[matplotlib.ticker.FuncFormatter, str]:
    """
    Create a ticks formatter and a new label for the data that is to be used
    on the axes where the data is plotted.

    For example, if values of data are all "nano" in units of volts "V",
    then the plot might be more readable if the tick formatter would show
    values like "1" instead of "0.000000001" while the units in the axis label
    are changed from "V" to "nV" ('n' is for 'nano').

    The units for which unit prefixes are added can be found in
    `qcodes.utils.plotting._UNITS_FOR_RESCALING`. For all other units
    an exponential scaling factor is added to the label i.e.
    `(10^3 x e^2/hbar)`.

    Args:
        data_dict: A dictionary of the following structure
            {
                'data': <1D numpy array of points>,
                'name': <name of the parameter>,
                'label': <label of the parameter or ''>,
                'unit': <unit of the parameter or ''>
            }

    Returns:
        A tuple with the ticks formatter (matlplotlib.ticker.FuncFormatter) and
        the new label.
    """
    unit = data_dict['unit']

    maxval = np.nanmax(np.abs(data_dict['data']))
    prefix, selected_scale = find_scale_and_prefix(maxval, unit)

    new_unit = prefix + unit
    label = _get_label_of_data(data_dict)
    new_label = _make_axis_label(label, new_unit)

    scale_factor = 10**(-selected_scale)
    ticks_formatter = FuncFormatter(
        partial(_scale_formatter, factor=scale_factor))

    return ticks_formatter, new_label

    Create a ticks formatter and a new label for the data that is to be used
    on the axes where the data is plotted.

    For example, if values of data are all "nano" in units of volts "V",
    then the plot might be more readable if the tick formatter would show
    values like "1" instead of "0.000000001" while the units in the axis label
    are changed from "V" to "nV" ('n' is for 'nano').

    The units for which unit prefixes are added can be found in
    `qcodes.utils.plotting._UNITS_FOR_RESCALING`. For all other units
    an exponential scaling factor is added to the label i.e.
    `(10^3 x e^2/hbar)`.

    Args:
        data_dict: A dictionary of the following structure
            {
                'data': <1D numpy array of points>,
                'name': <name of the parameter>,
                'label': <label of the parameter or ''>,
                'unit': <unit of the parameter or ''>
            }

    Returns:
        A tuple with the ticks formatter (matlplotlib.ticker.FuncFormatter) and
        the new label.
    
Create a ticks formatter and a new label for the data that is to be used
on the axes where the data is plotted.



The units for which unit prefixes are added can be found in
`qcodes.utils.plotting._UNITS_FOR_RESCALING`. For all other units
an exponential scaling factor is added to the label i.e.
Create a ticks formatter and a new label for the data that is to be used on the axes where the data is plotted . The units for which unit prefixes are added can be found in ` qcodes . utils . plotting . _UNITS_FOR_RESCALING ` . For all other units an exponential scaling factor is added to the label i . e .
def _make_rescaled_ticks_and_units(
    data_dict: DSPlotData,
) -> Tuple[matplotlib.ticker.FuncFormatter, str]:
    unit = data_dict['unit']
    maxval = np.nanmax(np.abs(data_dict['data']))
    prefix, selected_scale = find_scale_and_prefix(maxval, unit)
    new_unit = prefix + unit
    label = _get_label_of_data(data_dict)
    new_label = _make_axis_label(label, new_unit)
    scale_factor = 10**(-selected_scale)
    ticks_formatter = FuncFormatter(
        partial(_scale_formatter, factor=scale_factor))
    return ticks_formatter, new_label
def _make_rescaled_ticks_and_units ( data_dict : DSPlotData , ) -> Tuple [ matplotlib . ticker . FuncFormatter , str ] : unit = data_dict [ 'unit' ] maxval = np . nanmax ( np . abs ( data_dict [ 'data' ] ) ) prefix , selected_scale = find_scale_and_prefix ( maxval , unit ) new_unit = prefix + unit label = _get_label_of_data ( data_dict ) new_label = _make_axis_label ( label , new_unit ) scale_factor = 10 ** ( - selected_scale ) ticks_formatter = FuncFormatter ( partial ( _scale_formatter , factor = scale_factor ) ) return ticks_formatter , new_label
Create a ticks formatter and a new label for the data that is to be used
on the axes where the data is plotted.
Create a ticks formatter and a new label for the data that is to be used on the axes where the data is plotted .
"""
    Create a ticks formatter and a new label for the data that is to be used
    on the axes where the data is plotted.

    For example, if values of data are all "nano" in units of volts "V",
    then the plot might be more readable if the tick formatter would show
    values like "1" instead of "0.000000001" while the units in the axis label
    are changed from "V" to "nV" ('n' is for 'nano').

    The units for which unit prefixes are added can be found in
    `qcodes.utils.plotting._UNITS_FOR_RESCALING`. For all other units
    an exponential scaling factor is added to the label i.e.
    `(10^3 x e^2/hbar)`.

    Args:
        data_dict: A dictionary of the following structure
            {
                'data': <1D numpy array of points>,
                'name': <name of the parameter>,
                'label': <label of the parameter or ''>,
                'unit': <unit of the parameter or ''>
            }

    Returns:
        A tuple with the ticks formatter (matlplotlib.ticker.FuncFormatter) and
        the new label.
    """
A tuple with the ticks formatter (matlplotlib.ticker.FuncFormatter) and
the new label.
A tuple with the ticks formatter ( matlplotlib . ticker . FuncFormatter ) and the new label .
data_dict
DSPlotData
A dictionary of the following structure
{
'data': <1D numpy array of points>,
'name': ,
'label': ,
'unit': 
}
A dictionary of the following structure { ' data ' : <1D numpy array of points > ' name ' : ' label ' : ' unit ' : }