Parameters ---------- positions : 1D array-like Each value is an event. orientation : {'horizontal', 'vertical'}, default: 'horizontal' The sequence of events is plotted along this direction. The marker lines of the single events a
(self,
positions, # Cannot be None.
orientation='horizontal',
*,
lineoffset=0,
linelength=1,
linewidth=None,
color=None,
linestyle='solid',
antialiased=None,
**kwargs
)
| 1903 | _edge_default = True |
| 1904 | |
| 1905 | def __init__(self, |
| 1906 | positions, # Cannot be None. |
| 1907 | orientation='horizontal', |
| 1908 | *, |
| 1909 | lineoffset=0, |
| 1910 | linelength=1, |
| 1911 | linewidth=None, |
| 1912 | color=None, |
| 1913 | linestyle='solid', |
| 1914 | antialiased=None, |
| 1915 | **kwargs |
| 1916 | ): |
| 1917 | """ |
| 1918 | Parameters |
| 1919 | ---------- |
| 1920 | positions : 1D array-like |
| 1921 | Each value is an event. |
| 1922 | orientation : {'horizontal', 'vertical'}, default: 'horizontal' |
| 1923 | The sequence of events is plotted along this direction. |
| 1924 | The marker lines of the single events are along the orthogonal |
| 1925 | direction. |
| 1926 | lineoffset : float, default: 0 |
| 1927 | The offset of the center of the markers from the origin, in the |
| 1928 | direction orthogonal to *orientation*. |
| 1929 | linelength : float, default: 1 |
| 1930 | The total height of the marker (i.e. the marker stretches from |
| 1931 | ``lineoffset - linelength/2`` to ``lineoffset + linelength/2``). |
| 1932 | linewidth : float or list thereof, default: :rc:`lines.linewidth` |
| 1933 | The line width of the event lines, in points. |
| 1934 | color : :mpltype:`color` or list of :mpltype:`color`, default: :rc:`lines.color` |
| 1935 | The color of the event lines. |
| 1936 | linestyle : str or tuple or list thereof, default: 'solid' |
| 1937 | Valid strings are ['solid', 'dashed', 'dashdot', 'dotted', |
| 1938 | '-', '--', '-.', ':']. Dash tuples should be of the form:: |
| 1939 | |
| 1940 | (offset, onoffseq), |
| 1941 | |
| 1942 | where *onoffseq* is an even length tuple of on and off ink |
| 1943 | in points. |
| 1944 | antialiased : bool or list thereof, default: :rc:`lines.antialiased` |
| 1945 | Whether to use antialiasing for drawing the lines. |
| 1946 | **kwargs |
| 1947 | Forwarded to `.LineCollection`. |
| 1948 | |
| 1949 | Examples |
| 1950 | -------- |
| 1951 | .. plot:: gallery/lines_bars_and_markers/eventcollection_demo.py |
| 1952 | """ |
| 1953 | super().__init__([], |
| 1954 | linewidths=linewidth, linestyles=linestyle, |
| 1955 | colors=color, antialiaseds=antialiased, |
| 1956 | **kwargs) |
| 1957 | self._is_horizontal = True # Initial value, may be switched below. |
| 1958 | self._linelength = linelength |
| 1959 | self._lineoffset = lineoffset |
| 1960 | self.set_orientation(orientation) |
| 1961 | self.set_positions(positions) |
| 1962 |
nothing calls this directly
no test coverage detected