Commit 59d7830
committed
Fix axh{line,span} on polar axes.
For axhline, set the underlying path's _interpolation_steps to
GRIDLINE_INTERPOLATION_STEPS (180), which amounts to using the same
logic to draw it as for drawing gridlines. This ensures that a polar
axhline goes (due to interpolation) around the whole circle, rather than
being a trivial line connecting a point to itself. Also update axvline
for consistency. (Note that _interpolation_steps has is ignored for
rectilinear transforms and thus the change doesn't slow down the common,
rectilinear case.)
Increase the number of interpolation steps of ax{v,h}span likewise to
GRIDLINE_INTERPOLATION_STEPS (again for consistency), and more
importantly switch them to using Rectangle rather than Polygon, so that
a polar axhspan is drawn as an annulus. This is necessary due to a
separate "bug", whereby the CLOSEPOLY step on a Polygon would generate
(effectively) a segment that's unfortunately ignored by
_interpolation_steps (as it doesn't appear explicitly), whereas
Rectangle explicitly includes the closing (4th) segment before emitting
a CLOSEPOLY.1 parent 5f785e3 commit 59d7830
File tree
7 files changed
+60
-16
lines changed- doc/api/next_api_changes/behavior
- lib/matplotlib
- axes
- tests
- baseline_images/test_axes
7 files changed
+60
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
| 786 | + | |
| 787 | + | |
786 | 788 | | |
787 | 789 | | |
788 | 790 | | |
| |||
851 | 853 | | |
852 | 854 | | |
853 | 855 | | |
| 856 | + | |
| 857 | + | |
854 | 858 | | |
855 | 859 | | |
856 | 860 | | |
| |||
978 | 982 | | |
979 | 983 | | |
980 | 984 | | |
981 | | - | |
982 | | - | |
| 985 | + | |
983 | 986 | | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
984 | 992 | | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
985 | 996 | | |
986 | 997 | | |
987 | 998 | | |
| |||
1034 | 1045 | | |
1035 | 1046 | | |
1036 | 1047 | | |
1037 | | - | |
1038 | | - | |
| 1048 | + | |
1039 | 1049 | | |
1040 | | - | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
1041 | 1055 | | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
1042 | 1059 | | |
1043 | 1060 | | |
1044 | 1061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8849 | 8849 | | |
8850 | 8850 | | |
8851 | 8851 | | |
| 8852 | + | |
| 8853 | + | |
| 8854 | + | |
| 8855 | + | |
| 8856 | + | |
| 8857 | + | |
| 8858 | + | |
| 8859 | + | |
| 8860 | + | |
| 8861 | + | |
| 8862 | + | |
| 8863 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
| 674 | + | |
674 | 675 | | |
675 | 676 | | |
676 | 677 | | |
| |||
1011 | 1012 | | |
1012 | 1013 | | |
1013 | 1014 | | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
1014 | 1019 | | |
1015 | 1020 | | |
1016 | 1021 | | |
| |||
1022 | 1027 | | |
1023 | 1028 | | |
1024 | 1029 | | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
1025 | 1034 | | |
1026 | 1035 | | |
1027 | 1036 | | |
| |||
1033 | 1042 | | |
1034 | 1043 | | |
1035 | 1044 | | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1036 | 1049 | | |
1037 | 1050 | | |
1038 | 1051 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
437 | | - | |
| 436 | + | |
| 437 | + | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| |||
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
580 | | - | |
581 | 580 | | |
582 | | - | |
583 | | - | |
| 581 | + | |
584 | 582 | | |
585 | 583 | | |
586 | | - | |
587 | | - | |
| 584 | + | |
588 | 585 | | |
589 | | - | |
590 | 586 | | |
591 | 587 | | |
592 | 588 | | |
| |||
0 commit comments