Revision: 7882
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7882&view=rev
Author:   leejjoon
Date:     2009-10-13 05:28:55 +0000 (Tue, 13 Oct 2009)

Log Message:
-----------
fix axes_grid examples not to use if __name__ == '__main__'

Modified Paths:
--------------
    trunk/matplotlib/examples/axes_grid/demo_axes_divider.py
    trunk/matplotlib/examples/axes_grid/demo_axes_grid.py
    trunk/matplotlib/examples/axes_grid/demo_axes_grid2.py
    trunk/matplotlib/examples/axes_grid/demo_axes_rgb.py
    trunk/matplotlib/examples/axes_grid/demo_axisline_style.py
    trunk/matplotlib/examples/axes_grid/demo_floating_axis.py

Modified: trunk/matplotlib/examples/axes_grid/demo_axes_divider.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/demo_axes_divider.py    2009-10-13 
05:10:26 UTC (rev 7881)
+++ trunk/matplotlib/examples/axes_grid/demo_axes_divider.py    2009-10-13 
05:28:55 UTC (rev 7882)
@@ -126,6 +126,4 @@
     plt.show()
 
 
-
-if __name__ == "__main__":
-   demo()
+demo()

Modified: trunk/matplotlib/examples/axes_grid/demo_axes_grid.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/demo_axes_grid.py       2009-10-13 
05:10:26 UTC (rev 7881)
+++ trunk/matplotlib/examples/axes_grid/demo_axes_grid.py       2009-10-13 
05:28:55 UTC (rev 7882)
@@ -78,8 +78,7 @@
 
 
 
-if __name__ == "__main__":
-
+if 1:
     F = plt.figure(1, (5.5, 2.5))
 
     F.subplots_adjust(left=0.05, right=0.98)

Modified: trunk/matplotlib/examples/axes_grid/demo_axes_grid2.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/demo_axes_grid2.py      2009-10-13 
05:10:26 UTC (rev 7881)
+++ trunk/matplotlib/examples/axes_grid/demo_axes_grid2.py      2009-10-13 
05:28:55 UTC (rev 7882)
@@ -33,7 +33,7 @@
 
     return ao
 
-if __name__ == "__main__":
+if 1:
     F = plt.figure(1, (6, 6))
     F.clf()
 

Modified: trunk/matplotlib/examples/axes_grid/demo_axes_rgb.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/demo_axes_rgb.py        2009-10-13 
05:10:26 UTC (rev 7881)
+++ trunk/matplotlib/examples/axes_grid/demo_axes_rgb.py        2009-10-13 
05:28:55 UTC (rev 7882)
@@ -74,9 +74,7 @@
     return ax
 
 
-if __name__ == "__main__":
-    demo_rgb()
-    ax = demo_rgb2()
+demo_rgb()
+ax = demo_rgb2()
 
-    plt.draw()
-    plt.show()
+plt.show()

Modified: trunk/matplotlib/examples/axes_grid/demo_axisline_style.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/demo_axisline_style.py  2009-10-13 
05:10:26 UTC (rev 7881)
+++ trunk/matplotlib/examples/axes_grid/demo_axisline_style.py  2009-10-13 
05:28:55 UTC (rev 7882)
@@ -3,7 +3,7 @@
 import matplotlib.pyplot as plt
 import numpy as np
 
-if __name__ == "__main__":
+if 1:
     fig = plt.figure(1)
     ax = SubplotZero(fig, 111)
     fig.add_subplot(ax)
@@ -17,5 +17,5 @@
 
     x = np.linspace(-0.5, 1., 100)
     ax.plot(x, np.sin(x*np.pi))
-    
+
     plt.show()

Modified: trunk/matplotlib/examples/axes_grid/demo_floating_axis.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/demo_floating_axis.py   2009-10-13 
05:10:26 UTC (rev 7881)
+++ trunk/matplotlib/examples/axes_grid/demo_floating_axis.py   2009-10-13 
05:28:55 UTC (rev 7882)
@@ -60,14 +60,12 @@
 
     ax1.grid(True)
 
-if __name__ == "__main__":
-    import matplotlib.pyplot as plt
-    fig = plt.figure(1, figsize=(5, 5))
-    fig.clf()
+import matplotlib.pyplot as plt
+fig = plt.figure(1, figsize=(5, 5))
+fig.clf()
 
-    curvelinear_test2(fig)
+curvelinear_test2(fig)
 
-    plt.draw()
-    plt.show()
+plt.show()
 
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to