qcodes/utils/plotting.py
def auto_color_scale_from_config(colorbar: matplotlib.colorbar.Colorbar,
                                 auto_color_scale: Optional[bool] = None,
                                 data_array: Optional[np.ndarray] = None,
                                 cutoff_percentile: Optional[Union[Tuple[
                                     float, float], float]] = DEFAULT_PERCENTILE,
                                 color_over: Optional[Any] = None,
                                 color_under: Optional[Any] = None,
                                 ) -> None:
    """
    Sets the color limits such that outliers are disregarded, depending on
    the configuration file `qcodesrc.json`. If optional arguments are
    passed the config values are overridden.

    Args:
        colorbar: The colorbar to scale.
        auto_color_scale: Enable smart colorscale. If `False` nothing happens.
            Default value is read from
            ``config.plotting.auto_color_scale.enabled``.
        data_array: Numpy array containing the data to be considered for
            scaling.
        cutoff_percentile: The maxiumum percentile that is cut from the data.
            Default value is read from
            ``config.plotting.auto_color_scale.cutoff_percentile``.
        color_over: Matplotlib color representing the datapoints clipped
            by the upper limit. Default value is read from
            ``config.plotting.auto_color_scale.color_over``.
        color_under: Matplotlib color representing the datapoints clipped
            by the lower limit. Default value is read from
            ``config.plotting.auto_color_scale.color_under``.
    """
    if colorbar is None:
        log.warning('"auto_color_scale_from_config" did not receive a colorbar '
                    'for scaling. Are you trying to scale a plot without '
                    'colorbar?')
        return
    if auto_color_scale is None:
        auto_color_scale = qcodes.config.plotting.auto_color_scale.enabled
    if not auto_color_scale:
        return
    if color_over is None:
        color_over = qcodes.config.plotting.auto_color_scale.color_over
    if color_under is None:
        color_under = qcodes.config.plotting.auto_color_scale.color_under
    if cutoff_percentile is None:
        cutoff_percentile = cast(
            Tuple[float, float],
            tuple(qcodes.config.plotting.auto_color_scale.cutoff_percentile))

    apply_auto_color_scale(colorbar, data_array, cutoff_percentile,
                           color_over, color_under)

    Sets the color limits such that outliers are disregarded, depending on
    the configuration file `qcodesrc.json`. If optional arguments are
    passed the config values are overridden.

    Args:
        colorbar: The colorbar to scale.
        auto_color_scale: Enable smart colorscale. If `False` nothing happens.
            Default value is read from
            ``config.plotting.auto_color_scale.enabled``.
        data_array: Numpy array containing the data to be considered for
            scaling.
        cutoff_percentile: The maxiumum percentile that is cut from the data.
            Default value is read from
            ``config.plotting.auto_color_scale.cutoff_percentile``.
        color_over: Matplotlib color representing the datapoints clipped
            by the upper limit. Default value is read from
            ``config.plotting.auto_color_scale.color_over``.
        color_under: Matplotlib color representing the datapoints clipped
            by the lower limit. Default value is read from
            ``config.plotting.auto_color_scale.color_under``.
    
Sets the color limits such that outliers are disregarded, depending on
the configuration file `qcodesrc.json`. If optional arguments are
passed the config values are overridden.
Sets the color limits such that outliers are disregarded depending on the configuration file ` qcodesrc . json ` . If optional arguments are passed the config values are overridden .
def auto_color_scale_from_config(colorbar: matplotlib.colorbar.Colorbar,
                                 auto_color_scale: Optional[bool] = None,
                                 data_array: Optional[np.ndarray] = None,
                                 cutoff_percentile: Optional[Union[Tuple[
                                     float, float], float]] = DEFAULT_PERCENTILE,
                                 color_over: Optional[Any] = None,
                                 color_under: Optional[Any] = None,
                                 ) -> None:
    if colorbar is None:
        log.warning('"auto_color_scale_from_config" did not receive a colorbar '
                    'for scaling. Are you trying to scale a plot without '
                    'colorbar?')
        return
    if auto_color_scale is None:
        auto_color_scale = qcodes.config.plotting.auto_color_scale.enabled
    if not auto_color_scale:
        return
    if color_over is None:
        color_over = qcodes.config.plotting.auto_color_scale.color_over
    if color_under is None:
        color_under = qcodes.config.plotting.auto_color_scale.color_under
    if cutoff_percentile is None:
        cutoff_percentile = cast(
            Tuple[float, float],
            tuple(qcodes.config.plotting.auto_color_scale.cutoff_percentile))
    apply_auto_color_scale(colorbar, data_array, cutoff_percentile,
                           color_over, color_under)
def auto_color_scale_from_config ( colorbar : matplotlib . colorbar . Colorbar , auto_color_scale : Optional [ bool ] = None , data_array : Optional [ np . ndarray ] = None , cutoff_percentile : Optional [ Union [ Tuple [ float , float ] , float ] ] = DEFAULT_PERCENTILE , color_over : Optional [ Any ] = None , color_under : Optional [ Any ] = None , ) -> None : if colorbar is None : log . warning ( '"auto_color_scale_from_config" did not receive a colorbar ' 'for scaling. Are you trying to scale a plot without ' 'colorbar?' ) return if auto_color_scale is None : auto_color_scale = qcodes . config . plotting . auto_color_scale . enabled if not auto_color_scale : return if color_over is None : color_over = qcodes . config . plotting . auto_color_scale . color_over if color_under is None : color_under = qcodes . config . plotting . auto_color_scale . color_under if cutoff_percentile is None : cutoff_percentile = cast ( Tuple [ float , float ] , tuple ( qcodes . config . plotting . auto_color_scale . cutoff_percentile ) ) apply_auto_color_scale ( colorbar , data_array , cutoff_percentile , color_over , color_under )
Sets the color limits such that outliers are disregarded, depending on
the configuration file `qcodesrc.json`.
Sets the color limits such that outliers are disregarded depending on the configuration file ` qcodesrc . json ` .
"""
    Sets the color limits such that outliers are disregarded, depending on
    the configuration file `qcodesrc.json`. If optional arguments are
    passed the config values are overridden.

    Args:
        colorbar: The colorbar to scale.
        auto_color_scale: Enable smart colorscale. If `False` nothing happens.
            Default value is read from
            ``config.plotting.auto_color_scale.enabled``.
        data_array: Numpy array containing the data to be considered for
            scaling.
        cutoff_percentile: The maxiumum percentile that is cut from the data.
            Default value is read from
            ``config.plotting.auto_color_scale.cutoff_percentile``.
        color_over: Matplotlib color representing the datapoints clipped
            by the upper limit. Default value is read from
            ``config.plotting.auto_color_scale.color_over``.
        color_under: Matplotlib color representing the datapoints clipped
            by the lower limit. Default value is read from
            ``config.plotting.auto_color_scale.color_under``.
    """
colorbar
matplotlib.colorbar.Colorbar
The colorbar to scale.
The colorbar to scale .
auto_color_scale
Optional[bool]
Enable smart colorscale. If `False` nothing happens.
Default value is read from
``config.plotting.auto_color_scale.enabled``.
Enable smart colorscale . If ` False ` nothing happens . Default value is read from ` ` config . plotting . auto_color_scale . enabled ` ` .
data_array
Optional[np.ndarray]
Numpy array containing the data to be considered for
scaling.
Numpy array containing the data to be considered for scaling .
cutoff_percentile
Optional[Union[Tuple[
                                     float, float], float]]
The maxiumum percentile that is cut from the data.
Default value is read from
``config.plotting.auto_color_scale.cutoff_percentile``.
The maxiumum percentile that is cut from the data . Default value is read from ` ` config . plotting . auto_color_scale . cutoff_percentile ` ` .
color_over
Optional[Any]
Matplotlib color representing the datapoints clipped
by the upper limit. Default value is read from
``config.plotting.auto_color_scale.color_over``.
Matplotlib color representing the datapoints clipped by the upper limit . Default value is read from ` ` config . plotting . auto_color_scale . color_over ` ` .
color_under
Optional[Any]
Matplotlib color representing the datapoints clipped
by the lower limit. Default value is read from
``config.plotting.auto_color_scale.color_under``.
Matplotlib color representing the datapoints clipped by the lower limit . Default value is read from ` ` config . plotting . auto_color_scale . color_under ` ` .