Plot

Plotting signals.

komoog.plot.plot_signal(x, y, gradientphases=5, alpha=0.2, figsize=(4, 1))[source]

Plot a signal

Parameters
  • x (numpy.ndarray) -- signal x-values in range [0,1]

  • y (numpy.ndarray) -- signal y-values in range [-1,1]

  • gradientphases (int, default = 5) -- How many shades the signal shadow will show

  • alpha (float, default = 0.1) -- Transparency of shade

  • figsize (tuple of float, default = (4,1)) -- figure size

Returns

ax -- The axis on which the signal was plotted

Return type

matplotlib.Axes

komoog.plot.plot_tour(tour, gradientphases=5, alpha=0.2, figsize=(4, 1), max_elevation_difference=0)[source]

Plot a tour as a signal

Parameters
  • tour (dict) -- A downloaded tour

  • gradientphases (int, default = 5) -- How many shades the signal shadow will show

  • alpha (float, default = 0.1) -- Transparency of shade

  • figsize (tuple of float, default = (4,1)) -- figure size

  • max_elevation_difference (float, default = 0) -- for signal normlization

Returns

ax -- The axis on which the signal was plotted

Return type

matplotlib.Axes