示例#1
0
def show_multiple_phasePlot2(
        SeqParam_list,
        label_list=[],
        title="Diagram of states",
        legendOn=True,
        xLim=1,
        yLim=1,
        fontSize=10,
        getFig=False):
    """
    Plot a single sequence on the Pappu-Das phase plot (diagram of states). This function takes
    SequenceParameter objects rather than raw values

    INPUT:
    --------------------------------------------------------------------------------
    SeqParam_list | list of sequence parameter objects

    label         | On-plot label of sequence (DEFAULT = no label)
    title         | Plot title (DEFAULT = "Diagram of states")
    legendOn      | Include the phase diagram region legend (DEFAULT = True)
    xLim          | Set upper limit for the x axis (DEFAULT = 1)
    yLim          | Set upper limit for the y axis (DEFAULT = 1)
    fontSize      | Set font size for the point labels (DEFAULT = 10)
    getFig        | Returns a matplotlib figure object instead of simply displaying the
                  | plot on the screen (DEFAULT = False)


    OUTPUT:
    --------------------------------------------------------------------------------
    Nothing, but a plot with multiple points should appear on the screen

    """

    # construct the fraction positive and negative vectors
    fp_list = []
    fn_list = []
    for seq in SeqParam_list:
        fp_list.append(seq.get_fraction_positive())
        fn_list.append(seq.get_fraction_negative())

    return plotting.show_multiple_phasePlot(
        fp_list,
        fn_list,
        label_list,
        title,
        legendOn,
        xLim,
        yLim,
        fontSize,
        getFig)
示例#2
0
def show_multiple_phasePlot(
        fp_list,
        fn_list,
        label=[""],
        title="Diagram of states",
        legendOn=True,
        xLim=1,
        yLim=1,
        fontSize=10,
        getFig=False):
    """
    Plot multiple sequences on the same Pappu-Das phase plot (diagram of states).

    INPUT:
    --------------------------------------------------------------------------------
    fp_list    | Fraction of positive residues
    fn_list    | Fraction of negative residues

    label_list | On-plot label of sequence (DEFAULT = no label)
    title      | Plot title (DEFAULT = "Diagram of states")
    legendOn   | Include the phase diagram region legend (DEFAULT = True)
    xLim       | Set upper limit for the x axis (DEFAULT = 1)
    yLim       | Set upper limit for the x axis (DEFAULT = 1)
    fontSize   | Set font size for the point labels (DEFAULT = 10)
    getFig     | Returns a matplotlib figure object instead of simply displaying the
               | plot on the screen (DEFAULT = False)


    OUTPUT:
    --------------------------------------------------------------------------------
    Nothing, but a plot with multiple points should appear on the screen

    """

    return plotting.show_multiple_phasePlot(
        fp_list,
        fn_list,
        label,
        title,
        legendOn,
        xLim,
        yLim,
        fontSize,
        getFig)
示例#3
0
def show_multiple_phasePlot2(SeqParam_list,
                             label_list=[],
                             title="Diagram of states",
                             legendOn=True,
                             xLim=1,
                             yLim=1,
                             fontSize=10,
                             getFig=False):
    """
    Plot a single sequence on the Pappu-Das phase plot (diagram of states). This function takes
    SequenceParameter objects rather than raw values

    INPUT:
    --------------------------------------------------------------------------------
    SeqParam_list | list of sequence parameter objects

    label         | On-plot label of sequence (DEFAULT = no label)
    title         | Plot title (DEFAULT = "Diagram of states")
    legendOn      | Include the phase diagram region legend (DEFAULT = True)
    xLim          | Set upper limit for the x axis (DEFAULT = 1)
    yLim          | Set upper limit for the y axis (DEFAULT = 1)
    fontSize      | Set font size for the point labels (DEFAULT = 10)
    getFig        | Returns a matplotlib figure object instead of simply displaying the
                  | plot on the screen (DEFAULT = False)


    OUTPUT:
    --------------------------------------------------------------------------------
    Nothing, but a plot with multiple points should appear on the screen

    """

    # construct the fraction positive and negative vectors
    fp_list = []
    fn_list = []
    for seq in SeqParam_list:
        fp_list.append(seq.get_fraction_positive())
        fn_list.append(seq.get_fraction_negative())

    return plotting.show_multiple_phasePlot(fp_list, fn_list, label_list,
                                            title, legendOn, xLim, yLim,
                                            fontSize, getFig)
示例#4
0
def show_multiple_phasePlot(fp_list,
                            fn_list,
                            label=[""],
                            title="Diagram of states",
                            legendOn=True,
                            xLim=1,
                            yLim=1,
                            fontSize=10,
                            getFig=False):
    """
    Plot multiple sequences on the same Pappu-Das phase plot (diagram of states).

    INPUT:
    --------------------------------------------------------------------------------
    fp_list    | Fraction of positive residues
    fn_list    | Fraction of negative residues

    label_list | On-plot label of sequence (DEFAULT = no label)
    title      | Plot title (DEFAULT = "Diagram of states")
    legendOn   | Include the phase diagram region legend (DEFAULT = True)
    xLim       | Set upper limit for the x axis (DEFAULT = 1)
    yLim       | Set upper limit for the x axis (DEFAULT = 1)
    fontSize   | Set font size for the point labels (DEFAULT = 10)
    getFig     | Returns a matplotlib figure object instead of simply displaying the
               | plot on the screen (DEFAULT = False)


    OUTPUT:
    --------------------------------------------------------------------------------
    Nothing, but a plot with multiple points should appear on the screen

    """

    return plotting.show_multiple_phasePlot(fp_list, fn_list, label, title,
                                            legendOn, xLim, yLim, fontSize,
                                            getFig)