@@ -173,7 +173,6 @@ def test_hexbin(self):
173
173
@mpl .style .context ("default" )
174
174
def test_hist (self ):
175
175
mpl .rcParams ["date.converter" ] = 'concise'
176
- fig , (ax1 , ax2 , ax3 ) = plt .subplots (3 , 1 , constrained_layout = True )
177
176
178
177
start_date = datetime .datetime (2023 , 10 , 1 )
179
178
time_delta = datetime .timedelta (days = 1 )
@@ -182,6 +181,9 @@ def test_hist(self):
182
181
values2 = np .random .randint (1 , 10 , 30 )
183
182
values3 = np .random .randint (1 , 10 , 30 )
184
183
184
+ bin_edges = [start_date + i * time_delta for i in range (31 )]
185
+
186
+ fig , (ax1 , ax2 , ax3 ) = plt .subplots (3 , 1 , constrained_layout = True )
185
187
ax1 .hist (
186
188
[start_date + i * time_delta for i in range (30 )],
187
189
bins = 10 ,
@@ -198,6 +200,24 @@ def test_hist(self):
198
200
weights = values3
199
201
)
200
202
203
+ fig , (ax4 , ax5 , ax6 ) = plt .subplots (3 , 1 , constrained_layout = True )
204
+ ax4 .hist (
205
+ [start_date + i * time_delta for i in range (30 )],
206
+ bins = bin_edges ,
207
+ weights = values1
208
+ )
209
+ ax5 .hist (
210
+ [start_date + i * time_delta for i in range (30 )],
211
+ bins = bin_edges ,
212
+ weights = values2
213
+ )
214
+ ax6 .hist (
215
+ [start_date + i * time_delta for i in range (30 )],
216
+ bins = bin_edges ,
217
+ edgecolor = 'black' ,
218
+ weights = values3
219
+ )
220
+
201
221
@pytest .mark .xfail (reason = "Test for hist2d not written yet" )
202
222
@mpl .style .context ("default" )
203
223
def test_hist2d (self ):
0 commit comments