File tree 1 file changed +30
-0
lines changed 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -1660,6 +1660,36 @@ def test_boxplot_dates_pandas(pd):
1660
1660
plt .boxplot (data , positions = years )
1661
1661
1662
1662
1663
+ def test_pcolor_regression (pd ):
1664
+ from pandas .plotting import (
1665
+ register_matplotlib_converters ,
1666
+ deregister_matplotlib_converters ,
1667
+ )
1668
+
1669
+ fig = plt .figure ()
1670
+ ax = fig .add_subplot (111 )
1671
+
1672
+ times = [datetime .datetime (2021 , 1 , 1 )]
1673
+ while len (times ) < 7 :
1674
+ times .append (times [- 1 ] + datetime .timedelta (seconds = 120 ))
1675
+
1676
+ y_vals = np .arange (5 )
1677
+
1678
+ time_axis , y_axis = np .meshgrid (times , y_vals )
1679
+ shape = (len (y_vals ) - 1 , len (times ) - 1 )
1680
+ z_data = np .arange (shape [0 ] * shape [1 ])
1681
+
1682
+ z_data .shape = shape
1683
+ try :
1684
+ register_matplotlib_converters ()
1685
+
1686
+ im = ax .pcolormesh (time_axis , y_axis , z_data )
1687
+ # make sure this does not raise!
1688
+ fig .canvas .draw ()
1689
+ finally :
1690
+ deregister_matplotlib_converters ()
1691
+
1692
+
1663
1693
def test_bar_pandas (pd ):
1664
1694
# Smoke test for pandas
1665
1695
df = pd .DataFrame (
You can’t perform that action at this time.
0 commit comments