I'm a beginner in python, trying to calculate the basis for futures of spot price of BTC using quandl. When I try to plot the basis ((futures/spot-1)*100), I receive the error shown in the title
import matplotlib.pyplot as plt
import numpy as np
import quandl
futures = quandl.get("BITFINEX/BTCUSD.3")
spot = quandl.get("BITSTAMP/USD.2")
basis = (futures/spot+1)*100
plt.subplot(2,1,1)
plt.plot(futures)
plt.title('Main window')
plt.subplot(2,1,2)
plt.plot(basis)
plt.title('Basis')
plt.show()
error is : ValueError: view limit minimum -0.001 is less than 1 and is an invalid Matplotlib date value. This often happens if you pass a non-datetime value to an axis that has datetime units