Update the vertices of the *self.poly* slider in-place to cover the data range *vmin*, *vmax*.
(self, vmin, vmax)
| 851 | self.set_val(valinit) |
| 852 | |
| 853 | def _update_selection_poly(self, vmin, vmax): |
| 854 | """ |
| 855 | Update the vertices of the *self.poly* slider in-place |
| 856 | to cover the data range *vmin*, *vmax*. |
| 857 | """ |
| 858 | # The vertices are positioned |
| 859 | # 1 ------ 2 |
| 860 | # | | |
| 861 | # 0, 4 ---- 3 |
| 862 | verts = self.poly.xy |
| 863 | if self.orientation == "vertical": |
| 864 | verts[0] = verts[4] = .25, vmin |
| 865 | verts[1] = .25, vmax |
| 866 | verts[2] = .75, vmax |
| 867 | verts[3] = .75, vmin |
| 868 | else: |
| 869 | verts[0] = verts[4] = vmin, .25 |
| 870 | verts[1] = vmin, .75 |
| 871 | verts[2] = vmax, .75 |
| 872 | verts[3] = vmax, .25 |
| 873 | |
| 874 | def _min_in_bounds(self, min): |
| 875 | """Ensure the new min value is between valmin and self.val[1].""" |