Commit 39699eb
ENH: Apply TimeSeries_DateFormatter to bar plots with datetime indices (GH#1918)
Bar plots now use TimeSeries_DateFormatter for datetime and period indices,
matching the formatting behavior of line plots. This provides consistent
date formatting across different plot types.
Changes:
- Modified BarPlot._post_plot_logic() to detect time series indices
- Convert DatetimeIndex to PeriodIndex for consistent formatting
- Apply format_dateaxis() for proper date label formatting
- Added test to verify bar plots use TimeSeries_DateFormatter
- Updated secondary legend tests to use 'D' frequency instead of deprecated 'B'
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent efe1a5c commit 39699eb
File tree
3 files changed
+47
-12
lines changed- doc/source/whatsnew
- pandas
- plotting/_matplotlib
- tests/plotting
3 files changed
+47
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
2041 | 2042 | | |
2042 | 2043 | | |
2043 | 2044 | | |
2044 | | - | |
2045 | | - | |
2046 | | - | |
2047 | | - | |
2048 | | - | |
2049 | 2045 | | |
2050 | 2046 | | |
2051 | 2047 | | |
2052 | | - | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
2053 | 2076 | | |
2054 | 2077 | | |
2055 | 2078 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1264 | 1264 | | |
1265 | 1265 | | |
1266 | 1266 | | |
1267 | | - | |
| 1267 | + | |
1268 | 1268 | | |
1269 | 1269 | | |
1270 | 1270 | | |
| |||
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
1288 | | - | |
| 1288 | + | |
1289 | 1289 | | |
1290 | 1290 | | |
1291 | 1291 | | |
| |||
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
1304 | | - | |
| 1304 | + | |
1305 | 1305 | | |
1306 | 1306 | | |
1307 | 1307 | | |
| |||
1313 | 1313 | | |
1314 | 1314 | | |
1315 | 1315 | | |
1316 | | - | |
| 1316 | + | |
1317 | 1317 | | |
1318 | 1318 | | |
1319 | 1319 | | |
| |||
1325 | 1325 | | |
1326 | 1326 | | |
1327 | 1327 | | |
1328 | | - | |
| 1328 | + | |
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
1332 | 1332 | | |
1333 | 1333 | | |
1334 | 1334 | | |
1335 | | - | |
| 1335 | + | |
1336 | 1336 | | |
1337 | 1337 | | |
1338 | 1338 | | |
| |||
1691 | 1691 | | |
1692 | 1692 | | |
1693 | 1693 | | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
1694 | 1705 | | |
1695 | 1706 | | |
1696 | 1707 | | |
| |||
0 commit comments