How to use the mpld3.utils function in mpld3

To help you get started, we’ve selected a few mpld3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gwastro / pycbc / pycbc / results / mpld3_utils.py View on Github external
def __init__(self, points, links):
        self.dict_ = {"type": "clicklink",
                      "id": mpld3.utils.get_id(points),
                      "links": links,
                      }
github Patent2net / P2N / Patent2Net / P2N-Cluster.py View on Github external
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}
github sglebs / srccheck / utilities / utils.py View on Github external
def __init__(self, points):
        self.dict_ = {"type": "clicksendtoback",
                      "id": mpld3.utils.get_id(points)}
github hugadams / scikit-spectra / skspec / interact / ipynbs / line_plugin.py View on Github external
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
github thunder-project / thunder / python / thunder / viz / plugins.py View on Github external
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}
github jcornford / pyecog / pyecog / visualisation / javascript.py View on Github external
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):
github dparks1134 / RefineM / refinem / plots / mpld3_plugins.py View on Github external
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}
github thunder-project / thunder / python / thunder / viz / plugins.py View on Github external
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}
github svenkreiss / databench_examples / analyses / mpld3Drag / analysis.py View on Github external
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)}
github tim-fiola / network_traffic_modeler_py3 / examples / graph_network / graph_network_interactive.py View on Github external
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),
                      }