@@ -40,60 +40,6 @@ def tearDown( self ):
4040 """Clean-up any generated files here."""
4141 pass
4242
43- #--------------------------------------------------------------------
44- def test_shaped_data ( self ):
45- """Test numpy shaped data."""
46-
47- xdata = npy .array ([[ 0.53295185 , 0.23052951 , 0.19057629 , 0.66724975 , 0.96577916 ,
48- 0.73136095 , 0.60823287 , 0.017921 , 0.29744742 , 0.27164665 ],
49- [ 0.2798012 , 0.25814229 , 0.02818193 , 0.12966456 , 0.57446277 ,
50- 0.58167607 , 0.71028245 , 0.69112737 , 0.89923072 , 0.99072476 ],
51- [ 0.81218578 , 0.80464528 , 0.76071809 , 0.85616314 , 0.12757994 ,
52- 0.94324936 , 0.73078663 , 0.09658102 , 0.60703967 , 0.77664978 ],
53- [ 0.28332265 , 0.81479711 , 0.86985333 , 0.43797066 , 0.32540082 ,
54- 0.43819229 , 0.92230363 , 0.49414252 , 0.68168256 , 0.05922372 ],
55- [ 0.10721335 , 0.93904142 , 0.79163075 , 0.73232848 , 0.90283839 ,
56- 0.68408046 , 0.25502302 , 0.95976614 , 0.59214115 , 0.13663711 ],
57- [ 0.28087456 , 0.33127607 , 0.15530412 , 0.76558121 , 0.83389773 ,
58- 0.03735974 , 0.98717738 , 0.71432229 , 0.54881366 , 0.86893953 ],
59- [ 0.77995937 , 0.995556 , 0.29688434 , 0.15646162 , 0.051848 ,
60- 0.37161935 , 0.12998491 , 0.09377296 , 0.36882507 , 0.36583435 ],
61- [ 0.37851836 , 0.05315792 , 0.63144617 , 0.25003433 , 0.69586032 ,
62- 0.11393988 , 0.92362096 , 0.88045438 , 0.93530252 , 0.68275072 ],
63- [ 0.86486596 , 0.83236675 , 0.82960664 , 0.5779663 , 0.25724233 ,
64- 0.84841095 , 0.90862812 , 0.64414887 , 0.3565272 , 0.71026066 ],
65- [ 0.01383268 , 0.3406093 , 0.76084285 , 0.70800694 , 0.87634056 ,
66- 0.08213693 , 0.54655021 , 0.98123181 , 0.44080053 , 0.86815815 ]])
67-
68- fname = self .outFile ( "shaped_data.png" )
69-
70- y1 = npy .arange ( 10 )
71- y1 .shape = 1 , 10
72-
73- y2 = npy .arange ( 10 )
74- y2 .shape = 10 , 1
75-
76- fig = pylab .figure ()
77- pylab .subplot ( 411 )
78- pylab .plot ( y1 )
79- pylab .subplot ( 412 )
80- pylab .plot ( y2 )
81-
82- pylab .subplot ( 413 )
83- try :
84- pylab .plot ( y1 , y2 )
85- except :
86- # This should fail
87- pass
88- else :
89- self .fail ( "Failed to raise an exception for mis-matched dimensions." )
90-
91- pylab .subplot ( 414 )
92- pylab .plot ( xdata [:,1 ], xdata [1 ,:], 'o' )
93-
94- fig .savefig ( fname )
95- self .checkImage ( fname )
96-
9743 #--------------------------------------------------------------------
9844 def test_const_xy ( self ):
9945 """Test constant xy data."""
0 commit comments