Helper function to replace the values of a coordinate array containing pd.Interval with their mid-points or - for pcolormesh - boundaries which increases length by 1.
(val, func_name)
| 646 | |
| 647 | |
| 648 | def _resolve_intervals_2dplot(val, func_name): |
| 649 | """ |
| 650 | Helper function to replace the values of a coordinate array containing |
| 651 | pd.Interval with their mid-points or - for pcolormesh - boundaries which |
| 652 | increases length by 1. |
| 653 | """ |
| 654 | label_extra = "" |
| 655 | if _valid_other_type(val, pd.Interval): |
| 656 | if func_name == "pcolormesh": |
| 657 | val = _interval_to_bound_points(val) |
| 658 | else: |
| 659 | val = _interval_to_mid_points(val) |
| 660 | label_extra = "_center" |
| 661 | |
| 662 | return val, label_extra |
| 663 | |
| 664 | |
| 665 | def _valid_other_type( |
no test coverage detected
searching dependent graphs…