Commit b84c83d
committed
MAINT/BUG: Simplify logic in plot_surface
Previously:
* "cell" perimeters were clumsily calculated with duplicates, which were then (badly) removed at runtime. As a result, every quadrilateral was drawn with 5 vertices!
* code to calculate normals was spread into multiple places
* average z was calculated even if not used
* normals were sometimes not calculated even when needed
* repeated conversion between stride and count was done
This will affect shading of plots very slightly, hence the image tests changing in this commit.
Adds a `cbook._array_perimeter` function for use here.1 parent 98c627d commit b84c83d
10 files changed
Lines changed: 12158 additions & 15159 deletions
File tree
- lib
- matplotlib/cbook
- mpl_toolkits
- mplot3d
- tests
- baseline_images/test_mplot3d
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2011 | 2011 | | |
2012 | 2012 | | |
2013 | 2013 | | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
2014 | 2053 | | |
2015 | 2054 | | |
2016 | 2055 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1683 | 1683 | | |
1684 | 1684 | | |
1685 | 1685 | | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
1686 | 1691 | | |
1687 | | - | |
1688 | | - | |
1689 | | - | |
1690 | | - | |
1691 | | - | |
1692 | | - | |
1693 | | - | |
1694 | | - | |
1695 | | - | |
1696 | | - | |
1697 | | - | |
1698 | | - | |
1699 | | - | |
1700 | | - | |
1701 | | - | |
1702 | | - | |
1703 | | - | |
1704 | | - | |
1705 | | - | |
1706 | | - | |
1707 | | - | |
1708 | | - | |
1709 | | - | |
1710 | | - | |
1711 | | - | |
1712 | | - | |
1713 | | - | |
1714 | | - | |
1715 | | - | |
1716 | | - | |
1717 | | - | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
1718 | 1702 | | |
1719 | 1703 | | |
1720 | 1704 | | |
1721 | | - | |
1722 | | - | |
1723 | | - | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | 1705 | | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
1735 | 1722 | | |
1736 | 1723 | | |
1737 | 1724 | | |
1738 | 1725 | | |
1739 | | - | |
| 1726 | + | |
1740 | 1727 | | |
1741 | 1728 | | |
1742 | 1729 | | |
1743 | | - | |
1744 | | - | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
1745 | 1733 | | |
1746 | 1734 | | |
1747 | 1735 | | |
1748 | 1736 | | |
1749 | 1737 | | |
1750 | 1738 | | |
1751 | | - | |
| 1739 | + | |
1752 | 1740 | | |
1753 | 1741 | | |
1754 | 1742 | | |
| |||
Binary file not shown.
0 commit comments