예제 #1
0
 def hatch(hatchpattern, density=6):
     """
     Given a hatch specifier, *hatchpattern*, generates a Path that
     can be used in a repeated hatching pattern.  *density* is the
     number of lines per unit square.
     """
     from matplotlib.hatch import get_path
     return (get_path(hatchpattern, density)
             if hatchpattern is not None else None)
예제 #2
0
파일: path.py 프로젝트: adnanb59/matplotlib
 def hatch(hatchpattern, density=6):
     """
     Given a hatch specifier, *hatchpattern*, generates a Path that
     can be used in a repeated hatching pattern.  *density* is the
     number of lines per unit square.
     """
     from matplotlib.hatch import get_path
     return (get_path(hatchpattern, density)
             if hatchpattern is not None else None)
예제 #3
0
 def hatch(cls, hatchpattern, density=6):
     """
     Given a hatch specifier, *hatchpattern*, generates a Path that
     can be used in a repeated hatching pattern.  *density* is the
     number of lines per unit square.
     """
     from matplotlib.hatch import get_path
     if hatchpattern is None:
         return None
     hatch_path = cls._hatch_dict.get((hatchpattern, density))
     if hatch_path is not None:
         return hatch_path
     hatch_path = get_path(hatchpattern, density)
     cls._hatch_dict[(hatchpattern, density)] = hatch_path
     return hatch_path
예제 #4
0
    def hatch(cls, hatchpattern, density=6):
        """
        Given a hatch specifier, *hatchpattern*, generates a Path that
        can be used in a repeated hatching pattern.  *density* is the
        number of lines per unit square.
        """
        from matplotlib.hatch import get_path

        if hatchpattern is None:
            return None

        hatch_path = cls._hatch_dict.get((hatchpattern, density))
        if hatch_path is not None:
            return hatch_path

        hatch_path = get_path(hatchpattern, density)
        cls._hatch_dict[(hatchpattern, density)] = hatch_path
        return hatch_path