# Path: sherpa_contrib/profiles/annotations.py
# @ignore_attribute_error
# def add_latex_symbol(symbol):
#     r"""Add a LaTeX symbol.
# 
#     Parameters
#     ----------
#     symbol: str
#         Examples include r'\epsilon' and r'\Sigma'.
# 
#     Returns
#     -------
#     label: str
#     """
# 
#     return backend.add_latex_symbol(symbol)
# 
# @ignore_attribute_error
# def add_subscript(term, subscript):
#     """Add a subscript to the term.
# 
#     This is intended to support LaTeX-like (or other) control codes.
# 
#     Parameters
#     ----------
#     term, subscript: str
# 
#     Returns
#     -------
#     label: str
#     """
# 
#     return backend.add_subscript(term, subscript)


import sherpa.astro.ui as ui
import sherpa.astro.data
import numpy as np
from sherpa.utils.err import ArgumentErr
from .annotations import add_latex_symbol, add_subscript
    symval : val
        The symbol value: something that can be converted to a string.

    Returns
    -------
    label : str
        Returns 'symname = symval' in a form suitable for the plotting
        backend (where symname is term + subscript).
    """

    return '{} = {}'.format(add_subscript(term, subscript), symval)


def _set_symbol(symname, symval):
    """Return a string showing the symbol setting.

    Parameters
    ----------
    symname: str
        The symbol name (e.g. '\theta')
    symval : val
        The symbol value: something that can be converted to a string.

    Returns
    -------
    label : str
        Returns 'symname = symval' in a form suitable for the plotting
        backend.
    """


# Path: sherpa_contrib/profiles/annotations.py
# @ignore_attribute_error
# def add_latex_symbol(symbol):
#     r"""Add a LaTeX symbol.
# 
#     Parameters
#     ----------
#     symbol: str
#         Examples include r'\epsilon' and r'\Sigma'.
# 
#     Returns
#     -------
#     label: str
#     """
# 
#     return backend.add_latex_symbol(symbol)
# 
# @ignore_attribute_error
# def add_subscript(term, subscript):
#     """Add a subscript to the term.
# 
#     This is intended to support LaTeX-like (or other) control codes.
# 
#     Parameters
#     ----------
#     term, subscript: str
# 
#     Returns
#     -------
#     label: str
#     """
# 
#     return backend.add_subscript(term, subscript)


# Path: sherpa_contrib/profiles/calculate.py
import sherpa.astro.ui as ui
import sherpa.astro.data
import numpy as np
from sherpa.utils.err import ArgumentErr
from .annotations import add_latex_symbol, add_subscript

    symval : val
        The symbol value: something that can be converted to a string.

    Returns
    -------
    label : str
        Returns 'symname = symval' in a form suitable for the plotting
        backend (where symname is term + subscript).
    """

    return '{} = {}'.format(add_subscript(term, subscript), symval)


def _set_symbol(symname, symval):
    """Return a string showing the symbol setting.

    Parameters
    ----------
    symname: str
        The symbol name (e.g. '\theta')
    symval : val
        The symbol value: something that can be converted to a string.

    Returns
    -------
    label : str
        Returns 'symname = symval' in a form suitable for the plotting
        backend.
    """


    return '{} = {}'.format(add_latex_symbol(symname), symval)