Esempio n. 1
0
    def labels(self):
        """
        Returns a dictionary of LaTeX labels of the sampled and derived parameters.

        Uses the parameter name if no label has been given.
        """
        get_label = lambda p, info: (ensure_nolatex(
            getattr(info, "get", lambda x, y: y)
            (_p_label, p.replace("_", r"\ "))))
        return odict([[p, get_label(p, info)]
                      for p, info in self._infos.items()])
Esempio n. 2
0
    def labels(self):
        """
        Returns a dictionary of LaTeX labels of the sampled and derived parameters.

        Uses the parameter name of no label has been given.
        """
        get_label = lambda p, info: (ensure_nolatex(
            getattr(info, "get", lambda x, y: y)(_p_label, p)))
        return odict([[p, get_label(p, info)]
                      for p, info in list(self.sampled_params().items()) +
                      list(self.derived_params().items())])
Esempio n. 3
0
 def get_label(p, info):
     return ensure_nolatex(getattr(info, "get", lambda x, y: y)
                           (partag.latex, p.replace("_", r"\ ")))