##// END OF EJS Templates
Small fixes for Animation and Progress notebook
Jens H Nielsen -
Show More
@@ -115,7 +115,7 b''
115 "collapsed": false,
115 "collapsed": false,
116 "input": [
116 "input": [
117 "from scipy.special import jn",
117 "from scipy.special import jn",
118 "x = linspace(0,5)",
118 "x = np.linspace(0,5)",
119 "f, ax = plt.subplots()",
119 "f, ax = plt.subplots()",
120 "ax.set_title(\"Bessel functions\")",
120 "ax.set_title(\"Bessel functions\")",
121 "",
121 "",
@@ -244,7 +244,7 b''
244 " all_full = self.width - 2",
244 " all_full = self.width - 2",
245 " num_hashes = int(round((percent_done / 100.0) * all_full))",
245 " num_hashes = int(round((percent_done / 100.0) * all_full))",
246 " self.prog_bar = '[' + self.fill_char * num_hashes + ' ' * (all_full - num_hashes) + ']'",
246 " self.prog_bar = '[' + self.fill_char * num_hashes + ' ' * (all_full - num_hashes) + ']'",
247 " pct_place = (len(self.prog_bar) / 2) - len(str(percent_done))",
247 " pct_place = (len(self.prog_bar) // 2) - len(str(percent_done))",
248 " pct_string = '%d%%' % percent_done",
248 " pct_string = '%d%%' % percent_done",
249 " self.prog_bar = self.prog_bar[0:pct_place] + \\",
249 " self.prog_bar = self.prog_bar[0:pct_place] + \\",
250 " (pct_string + self.prog_bar[pct_place + len(pct_string):])",
250 " (pct_string + self.prog_bar[pct_place + len(pct_string):])",
General Comments 0
You need to be logged in to leave comments. Login now