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

Title (and font properties) + frame removal #13

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 2 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
9 changes: 8 additions & 1 deletion scTDA/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
GLOBAL METHODS
"""

def _remove_frame(ax):
plt.setp(ax.spines.values(), linewidth=0)
ax.set_xticks([])
ax.set_yticks([])


def ParseAyasdiGraph(name, source, lab, user, password):
"""
Expand Down Expand Up @@ -1192,7 +1197,7 @@ def adjacency_matrix(self, lista, ind=1, verbose=False):

def draw(self, color, connected=True, labels=False, ccmap='jet', weight=8.0, save='', ignore_log=False,
table=False, axis=[], a=0.4, dpi=None, figsize=None, lw=1.0, title=None,
font_props={'fontname': 'Arial'}):
font_props={'fontname': 'Arial'}, remove_frame=False):
"""
Displays topological representation of the data colored according to the expression of a gene, genes or
list of genes, specified by argument 'color'. This can be a gene or a list of one, two or three genes or lists
Expand Down Expand Up @@ -1340,6 +1345,8 @@ def draw(self, color, connected=True, labels=False, ccmap='jet', weight=8.0, sav
pylab.subplots_adjust(bottom=0.2)
if title is not None:
plt.title(title, **font_props)
if remove_frame:
_remove_frame(plt.gca())
if len(axis) == 4:
pylab.axis(axis)
if save == '':
Expand Down