Skip to content

Commit

Permalink
Fix deprecation warnings (#97)
Browse files Browse the repository at this point in the history
* Update make_figures.py

* Pin Seaborn 0.9.0 to requirements

* Fix the requirements file

* Update requirements.txt
  • Loading branch information
souravsingh authored Apr 8, 2019
1 parent cba38e2 commit 38e5f31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ pandas
python-louvain==0.11
numpy
scipy
seaborn==0.9.0
scikit-learn
networkx>=2.2
seaborn
forceatlas2
nilearn==0.5.0a0
8 changes: 4 additions & 4 deletions scona/scripts/make_figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def plot_rich_club(rc, rc_rand, ax=None, figure_name=None, x_max=200, y_max=1.2,

if not norm:
# Plot the real rich club data
sns.tsplot(rc, color=color, ax=ax)
sns.lineplot(rc, color=color, ax=ax)

# Plot the random rich club data with confidence intervals error bars
sns.tsplot(rc_rand.T, err_style='ci_bars', color='grey', ci=95, ax=ax)
sns.lineplot(rc_rand.T, err_style='ci_bars', color='grey', ci=95, ax=ax)

# Fix the x and y axis limits
ax.set_xlim((0, x_max))
Expand All @@ -64,7 +64,7 @@ def plot_rich_club(rc, rc_rand, ax=None, figure_name=None, x_max=200, y_max=1.2,
# Divide the real rich club by the averge of the
# randomised rich club to get a normalised curve
rc_norm = rc / rc_rand.T
sns.tsplot(rc_norm, err_style='ci_bars', color=color, ax=ax, ci=95)
sns.lineplot(rc_norm, err_style='ci_bars', color=color, ax=ax, ci=95)

# Make sure there aren't too many bins!
plt.locator_params(nbins=5)
Expand Down Expand Up @@ -3360,7 +3360,7 @@ def read_in_rich_club(RichClub_file):
df = pd.read_csv(RichClub_file)
deg = list(df.pop('degree').values)
rc = list(df.pop('real graph').values)
return deg, rc, df.as_matrix()
return deg, rc, df.values

def network_summary_fig(corrmat_file, NodalMeasures_file, GlobalMeasures_file, RichClub_file, figures_dir):

Expand Down

0 comments on commit 38e5f31

Please sign in to comment.