Returns ------- levels : `numpy.ndarray` Levels at which the filled contours are added.
(self, cset, zdir='z', offset=None, axlim_clip=False)
| 2843 | axlim_clip=axlim_clip) |
| 2844 | |
| 2845 | def _add_contourf_set(self, cset, zdir='z', offset=None, axlim_clip=False): |
| 2846 | """ |
| 2847 | Returns |
| 2848 | ------- |
| 2849 | levels : `numpy.ndarray` |
| 2850 | Levels at which the filled contours are added. |
| 2851 | """ |
| 2852 | zdir = '-' + zdir |
| 2853 | |
| 2854 | midpoints = cset.levels[:-1] + np.diff(cset.levels) / 2 |
| 2855 | # Linearly interpolate to get levels for any extensions |
| 2856 | if cset._extend_min: |
| 2857 | min_level = cset.levels[0] - np.diff(cset.levels[:2]) / 2 |
| 2858 | midpoints = np.insert(midpoints, 0, min_level) |
| 2859 | if cset._extend_max: |
| 2860 | max_level = cset.levels[-1] + np.diff(cset.levels[-2:]) / 2 |
| 2861 | midpoints = np.append(midpoints, max_level) |
| 2862 | |
| 2863 | art3d.collection_2d_to_3d( |
| 2864 | cset, zs=offset if offset is not None else midpoints, zdir=zdir, |
| 2865 | axlim_clip=axlim_clip) |
| 2866 | return midpoints |
| 2867 | |
| 2868 | @_preprocess_data() |
| 2869 | def contour(self, X, Y, Z, *args, |
no outgoing calls
no test coverage detected