I am Charmie

メモとログ

How to handle cyclical continuous data

The detailed explanation is available here. The point is to express cyclical data on a circle.

[code lang="python"] import numpy as np import matplotlib.pyplot as plt

num_data = 12 months_as_radian = np.linspace(0.0, 2.0*np.pi, num_data, False) months_as_vector = np.concatenate([[np.sin(months_as_radian)], [np.cos(months_as_radian)]]) plt.plot(months_as_vector[0,:], months_as_vector[1,:]) <span data-mce-type="bookmark" id="mce_SELREST_start" data-mce-style="overflow:hidden;line-height:0" style="overflow:hidden;line-height:0" ></span>[/code]