qcodes/utils/plotting.py
def _set_colorbar_extend(colorbar: matplotlib.colorbar.Colorbar,
                         extend: str) -> None:
    """
    Workaround for a missing setter for the extend property of a matplotlib
    colorbar.

    The colorbar object in matplotlib has no setter method and setting the
    colorbar extend does not take any effect.
    Calling a subsequent update will cause a runtime
    error because of the internal implementation of the rendering of the
    colorbar. To circumvent this we need to manually specify the property
    `_inside`, which is a slice that describes which of the colorbar levels
    lie inside of the box and it is thereby dependent on the extend.

    Args:
        colorbar: the colorbar for which to set the extend
        extend: the desired extend ('neither', 'both', 'min' or 'max')
    """
    colorbar.extend = extend
    _slice_dict = {'neither': slice(0, None),
                   'both': slice(1, -1),
                   'min': slice(1, None),
                   'max': slice(0, -1)}
    colorbar._inside = _slice_dict[extend]

    Workaround for a missing setter for the extend property of a matplotlib
    colorbar.

    The colorbar object in matplotlib has no setter method and setting the
    colorbar extend does not take any effect.
    Calling a subsequent update will cause a runtime
    error because of the internal implementation of the rendering of the
    colorbar. To circumvent this we need to manually specify the property
    `_inside`, which is a slice that describes which of the colorbar levels
    lie inside of the box and it is thereby dependent on the extend.

    Args:
        colorbar: the colorbar for which to set the extend
        extend: the desired extend ('neither', 'both', 'min' or 'max')
    
Workaround for a missing setter for the extend property of a matplotlib
colorbar.

The colorbar object in matplotlib has no setter method and setting the
colorbar extend does not take any effect.
Calling a subsequent update will cause a runtime
error because of the internal implementation of the rendering of the
colorbar. To circumvent this we need to manually specify the property
`_inside`, which is a slice that describes which of the colorbar levels
lie inside of the box and it is thereby dependent on the extend.
Workaround for a missing setter for the extend property of a matplotlib colorbar . The colorbar object in matplotlib has no setter method and setting the colorbar extend does not take any effect . Calling a subsequent update will cause a runtime error because of the internal implementation of the rendering of the colorbar . To circumvent this we need to manually specify the property ` _inside ` which is a slice that describes which of the colorbar levels lie inside of the box and it is thereby dependent on the extend .
def _set_colorbar_extend(colorbar: matplotlib.colorbar.Colorbar,
                         extend: str) -> None:
    colorbar.extend = extend
    _slice_dict = {'neither': slice(0, None),
                   'both': slice(1, -1),
                   'min': slice(1, None),
                   'max': slice(0, -1)}
    colorbar._inside = _slice_dict[extend]
def _set_colorbar_extend ( colorbar : matplotlib . colorbar . Colorbar , extend : str ) -> None : colorbar . extend = extend _slice_dict = { 'neither' : slice ( 0 , None ) , 'both' : slice ( 1 , - 1 ) , 'min' : slice ( 1 , None ) , 'max' : slice ( 0 , - 1 ) } colorbar . _inside = _slice_dict [ extend ]
Workaround for a missing setter for the extend property of a matplotlib
colorbar.
Workaround for a missing setter for the extend property of a matplotlib colorbar .
"""
    Workaround for a missing setter for the extend property of a matplotlib
    colorbar.

    The colorbar object in matplotlib has no setter method and setting the
    colorbar extend does not take any effect.
    Calling a subsequent update will cause a runtime
    error because of the internal implementation of the rendering of the
    colorbar. To circumvent this we need to manually specify the property
    `_inside`, which is a slice that describes which of the colorbar levels
    lie inside of the box and it is thereby dependent on the extend.

    Args:
        colorbar: the colorbar for which to set the extend
        extend: the desired extend ('neither', 'both', 'min' or 'max')
    """
colorbar
matplotlib.colorbar.Colorbar
the colorbar for which to set the extend
the colorbar for which to set the extend
extend
str
the desired extend ('neither', 'both', 'min' or 'max')
the desired extend ( ' neither ' ' both ' ' min ' or ' max ' )