DOC: Replace doctest with literal code block

This commit is contained in:
Tony S Yu
2012-09-12 21:38:00 -04:00
parent a454b63421
commit 1108727ed8
2 changed files with 12 additions and 12 deletions
+6 -6
View File
@@ -46,13 +46,13 @@ def frt2(a):
>>> f = frt2(img)
Plot the results:
Plot the results::
>>> import matplotlib.pyplot as plt
>>> plt.imshow(f, interpolation='nearest', cmap=plt.cm.gray)
>>> plt.xlabel('Angle')
>>> plt.ylabel('Translation')
>>> # plt.show()
import matplotlib.pyplot as plt
plt.imshow(f, interpolation='nearest', cmap=plt.cm.gray)
plt.xlabel('Angle')
plt.ylabel('Translation')
plt.show()
References
----------
+6 -6
View File
@@ -131,13 +131,13 @@ def hough(img, theta=None):
>>> out, angles, d = hough(img)
Plot the results:
Plot the results::
>>> import matplotlib.pyplot as plt
>>> plt.imshow(out, cmap=plt.cm.bone)
>>> plt.xlabel('Angle (degree)')
>>> plt.ylabel('Distance %d (pixel)' % d[0])
>>> # plt.show()
import matplotlib.pyplot as plt
plt.imshow(out, cmap=plt.cm.bone)
plt.xlabel('Angle (degree)')
plt.ylabel('Distance %d (pixel)' % d[0])
plt.show()
.. plot:: hough_tf.py