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

Apply PEP8 #60

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions intermine/bar_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@ def plot_go_vs_p(list_name):
def autolabel(rects, ax):
i = 0
for rect in rects:
x = rect.get_x() + rect.get_width()/2.
x = rect.get_x() + rect.get_width() / 2.
y = rect.get_height()
ax.annotate(gene_count[i], (x, y), xytext=(0, 5),
ax.annotate(gene_count[i], (x, y),
xytext=(0, 5),
textcoords="offset points",
ha='center', va='bottom')
i = i+1
ha='center',
va='bottom')
i = i + 1

autolabel(ax.patches, ax)

Expand Down Expand Up @@ -169,12 +171,14 @@ def plot_go_vs_count(list_name):
def autolabel(rects, ax):
i = 0
for rect in rects:
x = rect.get_x() + rect.get_width()/2.
x = rect.get_x() + rect.get_width() / 2.
y = rect.get_height()
ax.annotate(annotation_count[i], (x, y), xytext=(0, 5),
ax.annotate(annotation_count[i], (x, y),
xytext=(0, 5),
textcoords="offset points",
ha='center', va='bottom')
i = i+1
ha='center',
va='bottom')
i = i + 1

autolabel(ax.patches, ax)
ax.margins(y=0.1)
Expand All @@ -194,7 +198,7 @@ def get_query(xml):
req.pathname2url(xml)
r = requests.get(link)
list = (r.text).split('\n')
for i in range(0, len(list)-1):
for i in range(0, len(list) - 1):
list[i] = list[i].split('\t')
return (list)

Expand Down Expand Up @@ -223,7 +227,7 @@ def query_to_barchart_log(xml, resp):
store = store.split(' ')
x_val = []
y_val = []
for i in range(0, len(list)-1):
for i in range(0, len(list) - 1):
x_val.append(list[i][1])
y_val.append(float(list[i][2]))

Expand All @@ -248,12 +252,14 @@ def query_to_barchart_log(xml, resp):
def autolabel(rects, ax):
i = 0
for rect in rects:
x = rect.get_x() + rect.get_width()/2.
x = rect.get_x() + rect.get_width() / 2.
y = rect.get_height()
ax.annotate(y_val[i], (x, y), xytext=(0, 5),
ax.annotate(y_val[i], (x, y),
xytext=(0, 5),
textcoords="offset points",
ha='center', va='bottom')
i = i+1
ha='center',
va='bottom')
i = i + 1

autolabel(ax.patches, ax)

Expand Down
Loading