Helper functions

Utility functions for PlotZ

class plotz.utils.Markers[source]

Built-in marker filters

static always(*args, **kw)

Marker filter that displays a marker for each data point

static equallySpaced(*args, **kw)

Marker filter that displays markers equally spaced (with respect to the x coordinate)

Parameters:
  • dX (float) – period of the markers. One marker gets displayed each time x advances by at least dX.
  • start (float) – abscissa of the first displayed marker.
static oneInN(*args, **kw)

Marker filter that displays a marker for one data point in N

Parameters:
  • N (int) – period of the markers. One data points in N gets a marker.
  • start (int) – index of the first data point to have a marker.
plotz.utils.nth(iterable, n, default=None)[source]

Returns the nth item or a default value

plotz.utils.ppfloat(x, fmt='%f')[source]

Return a pretty string representing the given float. All useless trailing zeros are removed.