77from datetime import datetime , timedelta
88import numpy as np
99
10- #tests = range(0,31)
11- #tests = range(27,29)
12- #tests = range(23,24)
13- tests = range (0 ,3 )
14- #tests = [25]
15- tests = [4 ]
10+ tests = range (0 ,5 )
11+ tests = [0 ]
1612
1713import matplotlib as plt
1814plt .rcParams .update ({'figure.max_open_warning' : 0 })
@@ -33,7 +29,7 @@ def testimg(fig, tn, tl):
3329
3430for tn in tests :
3531
36- # 1x1 ints
32+ # 1x1 ints and datetimes
3733 if tn == 0 :
3834 x = np .array ([1 ]) # Columns
3935 y = np .array ([1 ]) # Rows
@@ -56,61 +52,68 @@ def testimg(fig, tn, tl):
5652 fig , _ = heatmap (x , y , z , title = title )
5753 testimg (fig ,tn ,'c' )
5854
55+ x = [datetime (1970 , 1 , 1 )]
56+ y = [1 ]
57+ z = [[1 ]]
58+ title = 'test #' + str (tn ) + 'd z=1x1 dtime; col center and row center'
59+ fig , _ = heatmap (x , y , z , title = title )
60+ testimg (fig ,tn ,'d' )
61+
5962 # 1x2 and 2x1 ints
6063 if tn == 1 :
6164 x = np .array ([1 ]) # Columns
6265 y = np .array ([1 ,2 ]) # Rows
6366 z = np .array ([[1 ],[2 ]])
64- title = 'test #' + str (tn ) + 'd z=2x1 ints; col center and row centers'
67+ title = 'test #' + str (tn ) + 'a z=2x1 ints; col center and row centers'
6568 fig , _ = heatmap (x , y , z , title = title )
6669 testimg (fig ,tn ,'a' )
6770
6871 x = np .array ([1 ,2 ]) # Columns
6972 y = np .array ([1 ,2 ]) # Rows
7073 z = np .array ([[1 ],[2 ]])
71- title = 'test #' + str (tn ) + 'd z=2x1 ints; col edges and row centers'
74+ title = 'test #' + str (tn ) + 'b z=2x1 ints; col edges and row centers'
7275 fig , _ = heatmap (x , y , z , title = title )
7376 testimg (fig ,tn ,'b' )
7477
7578 x = np .array ([1 ]) # Columns
7679 y = np .array ([1 ,2 ,3 ]) # Rows
7780 z = np .array ([[1 ],[2 ]])
78- title = 'test #' + str (tn ) + 'f z=2x1 ints; col center and row edges'
81+ title = 'test #' + str (tn ) + 'c z=2x1 ints; col center and row edges'
7982 fig , _ = heatmap (x , y , z , title = title )
8083 testimg (fig ,tn ,'c' )
8184
8285 x = np .array ([1 ,4 ]) # Columns
8386 y = np .array ([1 ,2 ,3 ]) # Rows
8487 z = np .array ([[1 ],[2 ]])
85- title = 'test #' + str (tn ) + 'g z=2x1 ints; col edges and row edges'
88+ title = 'test #' + str (tn ) + 'd z=2x1 ints; col edges and row edges'
8689 fig , _ = heatmap (x , y , z , title = title )
8790 testimg (fig ,tn ,'d' )
8891
8992 x = np .array ([1 ,2 ]) # Columns
9093 y = np .array ([1 ]) # Rows
9194 z = np .array ([[1 ,2 ]])
92- title = 'test #' + str (tn ) + 'h z=1x2 ints; col centers and row center'
95+ title = 'test #' + str (tn ) + 'e z=1x2 ints; col centers and row center'
9396 fig , _ = heatmap (x , y , z , title = title )
9497 testimg (fig ,tn ,'e' )
9598
9699 x = np .array ([1 ,2 ]) # Columns
97100 y = np .array ([1 ,2 ]) # Rows
98101 z = np .array ([[1 ,2 ]])
99- title = 'test #' + str (tn ) + 'i z=1x2 ints; col centers and row edges'
102+ title = 'test #' + str (tn ) + 'f z=1x2 ints; col centers and row edges'
100103 fig , _ = heatmap (x , y , z , title = title )
101104 testimg (fig ,tn ,'f' )
102105
103106 x = np .array ([1 ,2 ,3 ]) # Columns
104107 y = np .array ([1 ]) # Rows
105108 z = np .array ([[1 ,2 ]])
106- title = 'test #' + str (tn ) + 'j z=1x2 ints; col edges and row center'
109+ title = 'test #' + str (tn ) + 'g z=1x2 ints; col edges and row center'
107110 fig , _ = heatmap (x , y , z , title = title )
108111 testimg (fig ,tn ,'g' )
109112
110113 x = np .array ([1 ,3 ,4 ]) # Columns
111114 y = np .array ([1 ,2.5 ]) # Rows
112115 z = np .array ([[1 ,2 ]])
113- title = 'test #' + str (tn ) + 'k z=1x2 ints; col edges and row edges'
116+ title = 'test #' + str (tn ) + 'h z=1x2 ints; col edges and row edges'
114117 fig , _ = heatmap (x , y , z , title = title )
115118 testimg (fig ,tn ,'h' )
116119
0 commit comments