I tried to do a 3D scatter plot in Python with string categories (i.e. activation functions and solvers for a neural network) on x and y and floating numbers (i.e. accuracy score of NN) on the z axis.
The following example raises the error: ValueError: could not convert string to float: 'str1'
I followed this documentation for 3D plots: https://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html
Any ideas, what might be the problem ? Many thanks in advance!
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
xs=['str1', 'str2']
print(type(xs))
ys=['str3', 'str4']
print(type(ys))
zs=[1,2]
ax.scatter(xs, ys, zs)