Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, points, links):
self.dict_ = {"type": "clicklink",
"id": mpld3.utils.get_id(points),
"links": links,
}
def __init__(self, points, labels, urls,
hoffset=0, voffset=10, css=None):
self.points = points
self.urls = urls
self.labels = labels
self.voffset = voffset
self.hoffset = hoffset
self.css_ = css or ""
if isinstance(points, matplotlib.lines.Line2D):
suffix = "pts"
else:
suffix = None
self.dict_ = {"type": "ClickInfo",
"id": mpld3.utils.get_id(points, suffix),
"urls": urls,
"labels": labels,
"hoffset": hoffset,
"voffset": voffset}
def __init__(self, points):
self.dict_ = {"type": "clicksendtoback",
"id": mpld3.utils.get_id(points)}
def __init__(self, lines):
self.lines = lines
self.dict_ = {"type": "linehighlight",
"line_ids": [utils.get_id(line) for line in lines],
"alpha_bg": 1.0, #How light to make highlighted line (can also set to alpha of original mpl plot this way)
"alpha_fg": 0.15} #How dark to make non-highlighted line
def __init__(self, points, line, linedata):
if isinstance(points, matplotlib.lines.Line2D):
suffix = "pts"
else:
suffix = None
self.dict_ = {"type": "linkedview",
"idpts": utils.get_id(points, suffix),
"idline": utils.get_id(line),
"data": linedata}
def __init__(self, points, line, linedata):
if isinstance(points, matplotlib.lines.Line2D):
suffix = "pts"
else:
suffix = None
self.dict_ = {"type": "linkedview",
"idpts": utils.get_id(points, suffix),
"idline": utils.get_id(line),
"data": linedata}
class ClickInfo(plugins.PluginBase):
def __init__(self, points, labels=None,
hoffset=0, voffset=10, css=None):
self.points = points
self.labels = labels
self.voffset = voffset
self.hoffset = hoffset
self.css_ = css or ""
if isinstance(points, matplotlib.lines.Line2D):
suffix = "pts"
else:
suffix = None
self.dict_ = {"type": "tooltip",
"id": mpld3.utils.get_id(points, suffix),
"labels": labels,
"hoffset": hoffset,
"voffset": voffset}
def __init__(self, points, line, linedata):
if isinstance(points, matplotlib.lines.Line2D):
suffix = "pts"
else:
suffix = None
self.dict_ = {"type": "linkedview",
"idpts": utils.get_id(points, suffix),
"idline": utils.get_id(line),
"data": linedata}
def __init__(self, points, line, patch):
if isinstance(points, mpl.lines.Line2D):
suffix = "pts"
else:
suffix = None
self.dict_ = {"type": "drag",
"idpts": mpld3.utils.get_id(points, suffix),
"idline": mpld3.utils.get_id(line),
"idpatch": mpld3.utils.get_id(patch)}
def __init__(self, points, line):
if isinstance(points, mpl.lines.Line2D):
suffix = "pts"
else:
suffix = None
self.dict_ = {"type": "drag",
"idpts": utils.get_id(points, suffix),
"idline": utils.get_id(line),
}