は私が試してみました15/10/2017
matplotlibの3D散布図の日付
形式で日付のリストを持っているそれはエラーTypeError: ufunc 'sqrt' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
に投げ、それは2Dがある場合は示し
from matplotlib import pyplot
import pandas as pd
dates = ['15/10/2016', '16/10/2016', "17/10/2015", "15/10/2014"]
dates_formatted = [pd.to_datetime(d) for d in dates ]
x = [1,2,3,4]
z = [5,6,7,8]
pyplot.scatter(x, dates_formatted, z)
pyplot.show()
次。例えばpyplot.scatter(x, dates_formatted)
は、私はまた、次の
ax = Axes3D(fig)
ax = fig.add_subplot(111,projection='3d')
ax.scatter(x, dates_formatted, y)
pyplot.show()
を試してみましたが、それはそれは座標系に文字列を変換する方法matplotlib
を伝えるために、常に簡単ではないのですエラーにFloat() argument must be a string or number
バックにそれらを置くことができます実際には、通常の 'Axes'オブジェクトのscatterメソッドを呼び出しています。 'ax = fig.add_subplot(111、projection = '3d')'で 'Axes3d'オブジェクトを作ってみてください。 –
それを試して質問を更新しました –