def test_plot_one_year():
     x = rolex.time_series(
         "2016-01-01 00:00:00", "2016-12-31 23:59:59", freq="7day")
     y1 = np.random.random(len(x))
     y2 = np.random.random(len(x))
     plot_one_year((x, x), (y1, y2),
                   xlabel="Time", ylabel="Stock Value", title="Stock Trends",
                   legend=["Stock 1", "Stock 2"]).show()
 def test_plot_two_scales():
     x = rolex.time_series(
         "2016-01-01 00:00:00", "2016-01-01 23:59:59", freq="10min")
     y11 = np.random.random(len(x))
     y12 = np.random.random(len(x))
     y21 = np.random.random(len(x)) * 10
     y22 = np.random.random(len(x)) * 10
     plot_two_scales((x, x), (y11, y12), (x, x), (y21, y22),
                     xlabel="Time", ylabel1="Interests Value", ylabel2="Stock Value", title="Stock Trends",
                     legend=["Interests1", "Interests2", "Stock1", "Stock2"]).show()
Ejemplo n.º 3
0
 def test_plot_one_year():
     x = rolex.time_series("2016-01-01 00:00:00",
                           "2016-12-31 23:59:59",
                           freq="7day")
     y1 = np.random.random(len(x))
     y2 = np.random.random(len(x))
     plot_one_year((x, x), (y1, y2),
                   xlabel="Time",
                   ylabel="Stock Value",
                   title="Stock Trends",
                   legend=["Stock 1", "Stock 2"]).show()
Ejemplo n.º 4
0
 def test_plot_two_scales():
     x = rolex.time_series("2016-01-01 00:00:00",
                           "2016-01-01 23:59:59",
                           freq="10min")
     y11 = np.random.random(len(x))
     y12 = np.random.random(len(x))
     y21 = np.random.random(len(x)) * 10
     y22 = np.random.random(len(x)) * 10
     plot_two_scales(
         (x, x), (y11, y12), (x, x), (y21, y22),
         xlabel="Time",
         ylabel1="Interests Value",
         ylabel2="Stock Value",
         title="Stock Trends",
         legend=["Interests1", "Interests2", "Stock1", "Stock2"]).show()