Permalink
Browse files

Examples cleanup: remove pl.close, it is now handled by gen_rst.

  • Loading branch information...
1 parent c07f957 commit 0d6d377cbc61d7bf484f0042ed844386432c1883 @fabianp fabianp committed Feb 28, 2011
@@ -40,7 +40,6 @@
###############################################################################
# Plot results
-pl.close('all')
pl.loglog(shrinkages, negative_logliks)
pl.xlabel('Shrinkage')
pl.ylabel('Negative log-likelihood')
@@ -77,7 +77,6 @@ def plot_samples(S, axis_list=None):
pl.xlabel('$x$')
pl.ylabel('$y$')
-pl.close('all')
pl.subplot(2, 2, 1)
plot_samples(S / S.std())
pl.title('True Independant Sources')
@@ -17,6 +17,7 @@
print __doc__
import numpy as np
+import pylab as pl
from scikits.learn.svm import SVC
from scikits.learn.cross_val import StratifiedKFold, permutation_test_score
@@ -49,15 +50,13 @@
###############################################################################
# View histogram of permutation scores
-import pylab as pl
-pl.close('all')
pl.hist(permutation_scores, label='Permutation scores')
ylim = pl.ylim()
pl.vlines(score, ylim[0], ylim[1], linestyle='--',
- color='g', linewidth=3, label='Classification Score'
- ' (pvalue %s)' % pvalue)
+ color='g', linewidth=3, label='Classification Score'
+ ' (pvalue %s)' % pvalue)
pl.vlines(1.0 / n_classes, ylim[0], ylim[1], linestyle='--',
- color='k', linewidth=3, label='Luck')
+ color='k', linewidth=3, label='Luck')
pl.ylim(ylim)
pl.legend()
pl.xlabel('Score')

0 comments on commit 0d6d377

Please sign in to comment.