Set the dash style for the gc. Parameters ---------- dash_offset : float Distance, in points, into the dash pattern at which to start the pattern. It is usually set to 0. dash_list : array-like or None The on-off sequence
(self, dash_offset, dash_list)
| 875 | self._clippath = path |
| 876 | |
| 877 | def set_dashes(self, dash_offset, dash_list): |
| 878 | """ |
| 879 | Set the dash style for the gc. |
| 880 | |
| 881 | Parameters |
| 882 | ---------- |
| 883 | dash_offset : float |
| 884 | Distance, in points, into the dash pattern at which to |
| 885 | start the pattern. It is usually set to 0. |
| 886 | dash_list : array-like or None |
| 887 | The on-off sequence as points. None specifies a solid line. All |
| 888 | values must otherwise be non-negative (:math:`\\ge 0`). |
| 889 | |
| 890 | Notes |
| 891 | ----- |
| 892 | See p. 666 of the PostScript |
| 893 | `Language Reference |
| 894 | <https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf>`_ |
| 895 | for more info. |
| 896 | """ |
| 897 | if dash_list is not None: |
| 898 | dl = np.asarray(dash_list) |
| 899 | if np.any(dl < 0.0): |
| 900 | raise ValueError( |
| 901 | "All values in the dash list must be non-negative") |
| 902 | if dl.size and not np.any(dl > 0.0): |
| 903 | raise ValueError( |
| 904 | 'At least one value in the dash list must be positive') |
| 905 | self._dashes = dash_offset, dash_list |
| 906 | |
| 907 | def set_foreground(self, fg, isRGBA=False): |
| 908 | """ |