We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5e2833a + ce959f0 commit 4855e46Copy full SHA for 4855e46
ipython/CoupledSpringMassSystem.ipynb
@@ -162,7 +162,7 @@
162
"with open('two_springs.dat', 'w') as f:\n",
163
" # Print & save the solution.\n",
164
" for t1, w1 in zip(t, wsol):\n",
165
- " print >> f, t1, w1[0], w1[1], w1[2], w1[3]"
+ " print(t1, w1[0], w1[1], w1[2], w1[3], file=f)"
166
],
167
"language": "python",
168
"metadata": {},
@@ -183,7 +183,7 @@
183
"# Plot the solution that was generated\n",
184
"\n",
185
"from numpy import loadtxt\n",
186
- "from pylab import figure, plot, xlabel, grid, hold, legend, title, savefig\n",
+ "from pylab import figure, plot, xlabel, grid, legend, title, savefig\n",
187
"from matplotlib.font_manager import FontProperties\n",
188
189
"t, x1, xy, x2, y2 = loadtxt('two_springs.dat', unpack=True)\n",
@@ -192,7 +192,6 @@
192
193
"xlabel('t')\n",
194
"grid(True)\n",
195
- "hold(True)\n",
196
"lw = 1\n",
197
198
"plot(t, x1, 'b', linewidth=lw)\n",
@@ -220,4 +219,4 @@
220
219
"metadata": {}
221
}
222
]
223
-}
+}
0 commit comments