publiplots.resolve_markers¶
- publiplots.resolve_markers(markers=None, n_markers=None, reverse=False)[source]¶
Resolve marker patterns for plotting.
Helper that standardises marker specifications into a concrete list. Handles marker cycling for arbitrary category counts and supports reversal.
- Parameters:
markers (list of str, optional) – Marker symbols to use. If
None, usesSTANDARD_MARKERS.n_markers (int, optional) – Number of markers to return. If provided, the source list is cycled to reach this count. If
None, returns the full source list.reverse (bool, default
False) – Whether to reverse the final marker order. Useful for changing visual hierarchy.
- Returns:
Resolved marker symbols.
- Return type:
Examples
Get default markers:
>>> import publiplots as pp >>> markers = pp.resolve_markers() >>> len(markers) 10
Get exactly 5 markers with cycling:
>>> markers = pp.resolve_markers(n_markers=5) >>> len(markers) 5
Use custom markers with cycling:
>>> markers = pp.resolve_markers(markers=['o', '^', 's'], n_markers=7)Get reversed markers:
>>> markers = pp.resolve_markers(n_markers=4, reverse=True)See also
resolve_marker_mapCreate a mapping from category values to markers.
STANDARD_MARKERSDefault marker pool.