from pyfeyn.points import Mark import pyx class CrossMark(Mark): def __init__(self, size=0.075): """A cross marker, e.g. to show neutrino oscillations.""" self.size = size self.point = None def getPath(self): """Return the path for this marker.""" if self.point is not None: x, y = self.point.getXY() return pyx.path.path(pyx.path.moveto(x - self.size, y - self.size), pyx.path.lineto(x + self.size, y + self.size), pyx.path.moveto(x - self.size, y + self.size), pyx.path.lineto(x + self.size, y - self.size) ).path() return None CROSS = CrossMark()