Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot.py - Non Functional #5

Open
AteeqMKhaliq opened this issue Jul 31, 2017 · 0 comments
Open

Plot.py - Non Functional #5

AteeqMKhaliq opened this issue Jul 31, 2017 · 0 comments

Comments

@AteeqMKhaliq
Copy link

AteeqMKhaliq commented Jul 31, 2017

Hello All,

i am trying to plot the graph for the output generated after running decomposition as usual and after finding the (1 s.d.) confidence intervals and a quasi-pvalue for each signature using Plot.py. i tried various ways but failed in generating the plot. May be the plot.py needs to be modified or I/O file should be tweeked !!! iam not very sure of it. I have modified the plot.py script as well but its not working for me .I am pasting plot.py (Modified version) for your reference.

I am using input.resamp.sig.txt as my input file for plotting --> let me know if this is correct or should i use some other file.
Let me know how best this can be solved.

Thanks !!!
Ateeq

`

import matplotlib.pyplot as plt
import sys
import numpy as np
import csv
from numpy import genfromtxt

def plot_signature(array, ylim=0.2, ax=None):
    color = ((0.196,0.714,0.863),)*16 + ((0.102,0.098,0.098),)*16 + ((0.816,0.180,0.192),)*16 + ((0.777,0.773,0.757),)*16 + ((0.604,0.777,0.408),)*16 + ((0.902,0.765,0.737),)*16
    color = list(color)
    
    width = max(array.shape)
    x = np.arange(width)
    if ax == None:
        f,ax = plt.subplots(1)
    bars = ax.bar(x, array)
    for h in range(len(x)):
        bars[h].set_color(color[h])
    plt.ylim(0, ylim)
    plt.xlim(0, width)
    plt.plot('/home/ateeqanees/Mutation/centos/input/plot.jpg')
    plt.show()

plot_signature(wines)
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant