Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commitd1e2a20
committed
FIX: correctly handle large arcs
The draw method of mpatches.Arc has two paths: - if the arc is "small" compared to its size in the rendered image then render the whole arc and let clipping do it's thing - if the arc is "big" compared to its size on the screen then sort out where the circle intersects the axes boundary and only draw that part of itThis makes several changes to the Arc draw method: - make sure that we keep angles in [0, 360) range - only go through the angle stretching code if we need to (to avoid numerical instability of angles not round-tripping with scale=1) - compute length, not offset from origin of width / height and use the correct transform. Previously we were effectively squaring the height and widthTests: - Adjusted an existing test image to use this failing case and to exercise both code paths. - Added a test function of ensuring we can draw a big arc in each quadrant1 parentefda565 commitd1e2a20
File tree
4 files changed
+623
-29
lines changed- lib/matplotlib
- tests
- baseline_images/test_patches
4 files changed
+623
-29
lines changedLines changed: 37 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1659 | 1659 |
| |
1660 | 1660 |
| |
1661 | 1661 |
| |
1662 |
| - | |
1663 |
| - | |
1664 |
| - | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
1665 | 1678 |
| |
1666 | 1679 |
| |
1667 |
| - | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
1668 | 1688 |
| |
1669 |
| - | |
| 1689 | + | |
| 1690 | + | |
1670 | 1691 |
| |
1671 | 1692 |
| |
1672 | 1693 |
| |
| |||
1700 | 1721 |
| |
1701 | 1722 |
| |
1702 | 1723 |
| |
1703 |
| - | |
1704 |
| - | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
1705 | 1728 |
| |
1706 | 1729 |
| |
1707 | 1730 |
| |
1708 |
| - | |
1709 | 1731 |
| |
1710 | 1732 |
| |
1711 |
| - | |
| 1733 | + | |
1712 | 1734 |
| |
1713 | 1735 |
| |
1714 | 1736 |
| |
1715 | 1737 |
| |
1716 | 1738 |
| |
1717 | 1739 |
| |
1718 |
| - | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
1719 | 1743 |
| |
1720 | 1744 |
| |
1721 |
| - | |
1722 | 1745 |
| |
1723 | 1746 |
| |
1724 |
| - | |
1725 |
| - | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
1726 | 1750 |
| |
1727 | 1751 |
| |
1728 | 1752 |
| |
|
0 commit comments
Comments
(0)