예제 #1
0
    def clean(x, y, series, color=None, label=None, size=None, alpha=None):
        """
        Create a joint scatter / line plot.

        .. image:: scatterline.png

        Parameters
        ----------
        x, y : array-like, each (n,)
            Input data for scatter plot as x,y coordinates

        t : array-like
            Input data for line plot

        color : array-like, optional, singleton or (n,3)
            Single rgb value or array to set point colors

        label : array-like, optional, singleton or (n,)
            Single integer or array to set point colors via group labels

        size : array-like, optional, singleton or (n,)
            Single size or array to set point sizes
        """

        points = vecs_to_points(x, y)
        series = array_to_lines(series)
        outdict = {'points': points, 'series': series}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, label, 'label')
        outdict = add_property(outdict, size, 'size')
        outdict = add_property(outdict, alpha, 'alpha')

        return outdict
예제 #2
0
    def clean(x, y, series, color=None, label=None, size=None, alpha=None):
        """
        Create a joint scatter / line plot.

        .. image:: scatterline.png

        Parameters
        ----------
        x, y : array-like, each (n,)
            Input data for scatter plot as x,y coordinates

        t : array-like
            Input data for line plot

        color : array-like, optional, singleton or (n,3)
            Single rgb value or array to set point colors

        label : array-like, optional, singleton or (n,)
            Single integer or array to set point colors via group labels

        size : array-like, optional, singleton or (n,)
            Single size or array to set point sizes
        """

        points = vecs_to_points(x, y)
        series = array_to_lines(series)
        outdict = {'points': points, 'series': series}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, label, 'label')
        outdict = add_property(outdict, size, 'size')
        outdict = add_property(outdict, alpha, 'alpha')

        return outdict
예제 #3
0
    def clean(x, y, conn, values=None, labels=None,color=None, group=None, colormap=None, size=None):
        """
        Create a node-link graph from spatial points and their connectivity.

        .. image:: graph.png

        Parameters
        ----------
        x,y : array-like, each (n,)
            Input data for nodes (x,y coordinates)

        conn : array-like, (n,n) or (n,3) or (n,2)
            Input connectivity data as either a matrix or a list of links.
            Matrix can be binary or continuous valued. Links should contain
            either 2 elements per link (source, target),
            or 3 elements (source, target, value).

        values : array-like, optional, singleton or (n,)
            Values to set node colors via a linear scale

        labels : array-like, optional, (n,)
            Array of text labels to set tooltips

        color : array-like, optional, singleton or (n,) or (n,3)
            Single rgb value or array to set node colors

        group : array-like, optional, singleton or (n,)
            Single integer or array to set node colors via group assignment

        colormap : string
            Specification of color map, only colorbrewer types supported

        size : array-like, optional, singleton or (n,)
            Single size or array to set node sizes

        tooltips : boolean, optional, default=True
            Whether to show tooltips

        zoom : boolean, optional, default=True
            Whether to allow zooming

        brush : boolean, optional, default=True
            Whether to support brushing
        """

        links = parse_links(conn)
        nodes = vecs_to_points(x, y)

        outdict = {'links': links, 'nodes': nodes}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, group, 'group')
        outdict = add_property(outdict, values, 'values')
        outdict = add_property(outdict, labels, 'labels')
        outdict = add_property(outdict, colormap, 'colormap')
        outdict = add_property(outdict, size, 'size')

        return outdict
예제 #4
0
    def clean(x, y, conn, values=None, labels=None,color=None, group=None, colormap=None, size=None):
        """
        Create a node-link graph from spatial points and their connectivity.

        .. image:: graph.png

        Parameters
        ----------
        x,y : array-like, each (n,)
            Input data for nodes (x,y coordinates)

        conn : array-like, (n,n) or (n,3) or (n,2)
            Input connectivity data as either a matrix or a list of links.
            Matrix can be binary or continuous valued. Links should contain
            either 2 elements per link (source, target),
            or 3 elements (source, target, value).

        values : array-like, optional, singleton or (n,)
            Values to set node colors via a linear scale

        labels : array-like, optional, (n,)
            Array of text labels to set tooltips

        color : array-like, optional, singleton or (n,) or (n,3)
            Single rgb value or array to set node colors

        group : array-like, optional, singleton or (n,)
            Single integer or array to set node colors via group assignment

        colormap : string
            Specification of color map, only colorbrewer types supported

        size : array-like, optional, singleton or (n,)
            Single size or array to set node sizes

        tooltips : boolean, optional, default=True
            Whether to show tooltips

        zoom : boolean, optional, default=True
            Whether to allow zooming

        brush : boolean, optional, default=True
            Whether to support brushing
        """

        links = parse_links(conn)
        nodes = vecs_to_points(x, y)

        outdict = {'links': links, 'nodes': nodes}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, group, 'group')
        outdict = add_property(outdict, values, 'values')
        outdict = add_property(outdict, labels, 'labels')
        outdict = add_property(outdict, colormap, 'colormap')
        outdict = add_property(outdict, size, 'size')

        return outdict
예제 #5
0
    def clean(x,
              y,
              color=None,
              label=None,
              value=None,
              colormap=None,
              size=None,
              alpha=None,
              xaxis=None,
              yaxis=None):
        """
        Plot two-dimensional data as points.

        .. image:: scatter.png

        Parameters
        ----------
        x, y : array-like, each (n,)
            Input data

        color : array-like, optional, singleton or (n,3)
            Single rgb value or array to set colors

        label : array-like, optional, singleton or (n,)
            Single integer or array to set colors via groups

        value : array-like, optional, singleton or (n,)
            Values to set node colors via a linear scale

        colormap : string
            Specification of color map, only colorbrewer types supported

        size : array-like, optional, singleton or (n,)
            Single size or array to set point sizes

        alpha : array-like, optional, singleton or (n,)
            Single alpha value or array to set fill and stroke opacity

        xaxis : str, optional, default = None
            Label for x-axis

        yaxis : str, optional, default = None
            Label for y-axis
        """

        points = vecs_to_points(x, y)
        outdict = {'points': points}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, label, 'label')
        outdict = add_property(outdict, value, 'value')
        outdict = add_property(outdict, colormap, 'colormap')
        outdict = add_property(outdict, size, 'size')
        outdict = add_property(outdict, alpha, 'alpha')
        outdict = add_property(outdict, xaxis, 'xaxis')
        outdict = add_property(outdict, yaxis, 'yaxis')

        return outdict
예제 #6
0
    def clean(x,
              y,
              conn,
              color=None,
              label=None,
              value=None,
              colormap=None,
              size=None,
              imagedata=None):
        """
        Create a node-link graph from spatial points and their connectivity.

        .. image:: graph.png

        Parameters
        ----------
        x,y : array-like, each (n,)
            Input data for nodes (x,y coordinates)

        conn : array-like, (n,n) or (n,3) or (n,2)
            Input connectivity data as either a matrix or a list of links.
            Matrix can be binary or continuous valued. Links should contain
            either 2 elements per link (source, target),
            or 3 elements (source, target, value).

        color : array-like, optional, singleton or (n,) or (n,3)
            Single rgb value or array to set node colors

        label : array-like, optional, singleton or (n,)
            Single integer or array to set node colors via group labels

        value : array-like, optional, singleton or (n,)
            Values to set node colors via a linear scale

        colormap : string
            Specification of color map, only colorbrewer types supported

        size : array-like, optional, singleton or (n,)
            Single size or array to set node sizes
        """

        links = parse_links(conn)
        nodes = vecs_to_points(x, y)

        outdict = {'links': links, 'nodes': nodes}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, label, 'label')
        outdict = add_property(outdict, value, 'value')
        outdict = add_property(outdict, colormap, 'colormap')
        outdict = add_property(outdict, size, 'size')

        if imagedata is not None:
            images = array_to_im(imagedata)
            outdict['images'] = images

        return outdict
예제 #7
0
    def clean(x, y, values=None, labels=None, group=None, color=None, colormap=None, size=None, xaxis=None, yaxis=None):
        """
        Create a streaming scatter plot of x and y.

        Plotting once returns a visualization on which 'append' can be called to add new data
        in a streaming fashion. The opacity of old and new data is automatically set
        to highlight the most recent data and fade old data away.

        .. image:: scatter.png

        Parameters
        ----------
        x, y : array-like, each (n,)
            Input data

        values : array-like, optional, singleton or (n,)
            Values to set node colors via a linear scale

        labels : array-like, optional, (n,)
            Array of text labels to set tooltips

        color : array-like, optional, singleton or (n,3)
            Single rgb value or array to set colors

        group : array-like, optional, singleton or (n,)
            Single integer or array to set colors via groups

        colormap : string
            Specification of color map, only colorbrewer types supported

        size : array-like, optional, singleton or (n,)
            Single size or array to set point sizes

        xaxis : str, optional, default = None
            Label for x-axis

        yaxis : str, optional, default = None
            Label for y-axis
        """

        points = vecs_to_points(x, y)
        outdict = {'points': points}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, group, 'group')
        outdict = add_property(outdict, values, 'values')
        outdict = add_property(outdict, labels, 'labels')
        outdict = add_property(outdict, colormap, 'colormap')
        outdict = add_property(outdict, size, 'size')
        outdict = add_property(outdict, xaxis, 'xaxis')
        outdict = add_property(outdict, yaxis, 'yaxis')

        return outdict
예제 #8
0
    def clean(x, y, color=None, label=None, value=None, colormap=None, size=None, xaxis=None, yaxis=None):
        """
        Create a streaming scatter plot of x and y.

        Plotting once returns a visualization on which 'append' can be called to add new data
        in a streaming fashion. The opacity of old and new data is automatically set
        to highlight the most recent data and fade old data away.

        .. image:: scatter.png

        Parameters
        ----------
        x, y : array-like, each (n,)
            Input data

        color : array-like, optional, singleton or (n,3)
            Single rgb value or array to set colors

        label : array-like, optional, singleton or (n,)
            Single integer or array to set colors via groups

        value : array-like, optional, singleton or (n,)
            Values to set node colors via a linear scale

        colormap : string
            Specification of color map, only colorbrewer types supported

        size : array-like, optional, singleton or (n,)
            Single size or array to set point sizes

        xaxis : str, optional, default = None
            Label for x-axis

        yaxis : str, optional, default = None
            Label for y-axis
        """

        points = vecs_to_points(x, y)
        outdict = {'points': points}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, label, 'label')
        outdict = add_property(outdict, value, 'value')
        outdict = add_property(outdict, colormap, 'colormap')
        outdict = add_property(outdict, size, 'size')
        outdict = add_property(outdict, xaxis, 'xaxis')
        outdict = add_property(outdict, yaxis, 'yaxis')

        return outdict
예제 #9
0
    def clean(x, y, conn, color=None, label=None, value=None, colormap=None, size=None, imagedata=None):
        """
        Create a node-link graph from spatial points and their connectivity.

        .. image:: graph.png

        Parameters
        ----------
        x,y : array-like, each (n,)
            Input data for nodes (x,y coordinates)

        conn : array-like, (n,n) or (n,3) or (n,2)
            Input connectivity data as either a matrix or a list of links.
            Matrix can be binary or continuous valued. Links should contain
            either 2 elements per link (source, target),
            or 3 elements (source, target, value).

        color : array-like, optional, singleton or (n,) or (n,3)
            Single rgb value or array to set node colors

        label : array-like, optional, singleton or (n,)
            Single integer or array to set node colors via group labels

        value : array-like, optional, singleton or (n,)
            Values to set node colors via a linear scale

        colormap : string
            Specification of color map, only colorbrewer types supported

        size : array-like, optional, singleton or (n,)
            Single size or array to set node sizes
        """

        links = parse_links(conn)
        nodes = vecs_to_points(x, y)

        outdict = {'links': links, 'nodes': nodes}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, label, 'label')
        outdict = add_property(outdict, value, 'value')
        outdict = add_property(outdict, colormap, 'colormap')
        outdict = add_property(outdict, size, 'size')

        if imagedata is not None:
            images = array_to_im(imagedata)
            outdict['images'] = images

        return outdict
예제 #10
0
    def clean(x, y, color=None, label=None, value=None, colormap=None, size=None, alpha=None, xaxis=None, yaxis=None):
        """
        Plot two-dimensional data as points.

        .. image:: scatter.png

        Parameters
        ----------
        x, y : array-like, each (n,)
            Input data

        color : array-like, optional, singleton or (n,3)
            Single rgb value or array to set colors

        label : array-like, optional, singleton or (n,)
            Single integer or array to set colors via groups

        value : array-like, optional, singleton or (n,)
            Values to set node colors via a linear scale

        colormap : string
            Specification of color map, only colorbrewer types supported

        size : array-like, optional, singleton or (n,)
            Single size or array to set point sizes

        alpha : array-like, optional, singleton or (n,)
            Single alpha value or array to set fill and stroke opacity

        xaxis : str, optional, default = None
            Label for x-axis

        yaxis : str, optional, default = None
            Label for y-axis
        """

        points = vecs_to_points(x, y)
        outdict = {'points': points}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, label, 'label')
        outdict = add_property(outdict, value, 'value')
        outdict = add_property(outdict, colormap, 'colormap')
        outdict = add_property(outdict, size, 'size')
        outdict = add_property(outdict, alpha, 'alpha')
        outdict = add_property(outdict, xaxis, 'xaxis')
        outdict = add_property(outdict, yaxis, 'yaxis')

        return outdict
예제 #11
0
    def clean(x, y, color=None, label=None, value=None, colormap=None, size=None, xaxis=None, yaxis=None):
        """
        Create a streaming scatter plot of x and y.

        Plotting once returns a visualization on which 'append' can be called to add new data
        in a streaming fashion. The opacity of old and new data is automatically set
        to highlight the most recent data and fade old data away.

        .. image:: scatter.png

        Parameters
        ----------
        x, y : array-like, each (n,)
            Input data

        color : array-like, optional, singleton or (n,3)
            Single rgb value or array to set colors

        label : array-like, optional, singleton or (n,)
            Single integer or array to set colors via groups

        value : array-like, optional, singleton or (n,)
            Values to set node colors via a linear scale

        colormap : string
            Specification of color map, only colorbrewer types supported

        size : array-like, optional, singleton or (n,)
            Single size or array to set point sizes

        xaxis : str, optional, default = None
            Label for x-axis

        yaxis : str, optional, default = None
            Label for y-axis
        """

        points = vecs_to_points(x, y)
        outdict = {"points": points}

        outdict = add_property(outdict, color, "color")
        outdict = add_property(outdict, label, "label")
        outdict = add_property(outdict, value, "value")
        outdict = add_property(outdict, colormap, "colormap")
        outdict = add_property(outdict, size, "size")
        outdict = add_property(outdict, xaxis, "xaxis")
        outdict = add_property(outdict, yaxis, "yaxis")

        return outdict
예제 #12
0
    def clean(x, y, color=None, label=None, size=None, xaxis=None, yaxis=None):
        """
        Create a streaming scatter plot of x and y.

        Plotting once returns a visualization on which 'append' can be called to add new data
        in a streaming fashion. The opacity of old and new data is automatically set
        to highlight the most recent data and fade old data away.

        .. image:: scatter.png

        Parameters
        ----------
        x, y : array-like, each (n,)
            Input data

        color : array-like, optional, singleton or (n,3)
            Single rgb value or array to set colors

        label : array-like, optional, singleton or (n,)
            Single integer or array to set colors via groups

        size : array-like, optional, singleton or (n,)
            Single size or array to set point sizes

        xaxis : str, optional, default = None
            Label for x-axis

        yaxis : str, optional, default = None
            Label for y-axis
        """

        points = vecs_to_points(x, y)
        outdict = {'points': points}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, label, 'label')
        outdict = add_property(outdict, size, 'size')
        outdict = add_property(outdict, xaxis, 'xaxis')
        outdict = add_property(outdict, yaxis, 'yaxis')

        return outdict
예제 #13
0
    def clean(x, y, matrix, color=None, label=None, size=None, imagedata=None):
        """
        Create a node-link graph with bundled edges.

        .. image:: graphbundled.png

        Parameters
        ----------
        x,y : array-like, each (n,)
            Input data for nodes (x,y coordinates)

        matrix : array, (n,n)
            Input data with connectivity matrix. Can be binary or continuous-valued
            (for weighted edges).

        color : array-like, optional, singleton or (n,) or (n,3)
            Single rgb value or array to set node colors

        label : array-like, optional, singleton or (n,)
            Single integer or array to set node colors via group labels

        size : array-like, optional, singleton or (n,)
            Single size or array to set node sizes
        """

        points = vecs_to_points(x, y)
        links = mat_to_links(matrix)

        outdict = {'links': links, 'nodes': points}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, label, 'label')
        outdict = add_property(outdict, size, 'size')

        if imagedata is not None:
            images = array_to_im(imagedata)
            outdict['images'] = images

        return outdict
예제 #14
0
    def clean(x, y, labels=None, values=None, color=None, group=None, colormap=None,
              size=None, alpha=None, xaxis=None, yaxis=None):
        """
        Plot two-dimensional data as points.

        .. image:: scatter.png

        Parameters
        ----------
        x, y : array-like, each (n,)
            Input data

        values : array-like, optional, singleton or (n,)
            Values to set node colors via a linear scale

        labels : array-like, optional, (n,)
            Array of text labels to set tooltips

        color : array-like, optional, singleton or (n,3)
            Single rgb value or array to set colors

        group : array-like, optional, singleton or (n,)
            Single integer or array to set colors via groups

        colormap : string
            Specification of color map, only colorbrewer types supported

        size : array-like, optional, singleton or (n,)
            Single size or array to set point sizes

        alpha : array-like, optional, singleton or (n,)
            Single alpha value or array to set fill and stroke opacity

        xaxis : str, optional, default = None
            Label for x-axis

        yaxis : str, optional, default = None
            Label for y-axis

        tooltips : boolean, optional, default=True
            Whether to show tooltips

        zoom : boolean, optional, default=True
            Whether to allow zooming

        brush : boolean, optional, default=True
            Whether to support brushing
        """

        points = vecs_to_points(x, y)
        outdict = {'points': points}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, group, 'group')
        outdict = add_property(outdict, labels, 'labels')
        outdict = add_property(outdict, values, 'values')
        outdict = add_property(outdict, colormap, 'colormap')
        outdict = add_property(outdict, size, 'size')
        outdict = add_property(outdict, alpha, 'alpha')
        outdict = add_property(outdict, xaxis, 'xaxis')
        outdict = add_property(outdict, yaxis, 'yaxis')

        return outdict
예제 #15
0
    def clean(x, y, labels=None, values=None, color=None, group=None, colormap=None,
              size=None, alpha=None, xaxis=None, yaxis=None):
        """
        Plot two-dimensional data as points.

        .. image:: scatter.png

        Parameters
        ----------
        x, y : array-like, each (n,)
            Input data

        values : array-like, optional, singleton or (n,)
            Values to set node colors via a linear scale

        labels : array-like, optional, (n,)
            Array of text labels to set tooltips

        color : array-like, optional, singleton or (n,3)
            Single rgb value or array to set colors

        group : array-like, optional, singleton or (n,)
            Single integer or array to set colors via groups

        colormap : string
            Specification of color map, only colorbrewer types supported

        size : array-like, optional, singleton or (n,)
            Single size or array to set point sizes

        alpha : array-like, optional, singleton or (n,)
            Single alpha value or array to set fill and stroke opacity

        xaxis : str, optional, default = None
            Label for x-axis

        yaxis : str, optional, default = None
            Label for y-axis

        tooltips : boolean, optional, default=True
            Whether to show tooltips

        zoom : boolean, optional, default=True
            Whether to allow zooming

        brush : boolean, optional, default=True
            Whether to support brushing
        """

        points = vecs_to_points(x, y)
        outdict = {'points': points}

        outdict = add_property(outdict, color, 'color')
        outdict = add_property(outdict, group, 'group')
        outdict = add_property(outdict, labels, 'labels')
        outdict = add_property(outdict, values, 'values')
        outdict = add_property(outdict, colormap, 'colormap')
        outdict = add_property(outdict, size, 'size')
        outdict = add_property(outdict, alpha, 'alpha')
        outdict = add_property(outdict, xaxis, 'xaxis')
        outdict = add_property(outdict, yaxis, 'yaxis')

        return outdict