0
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter3D(df["Date"], df["New case"], df["New PCR.1"], color = "green");

I am new to python. I got the error above mentioned i.e. "ValueError: view limit minimum -0.05 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" and couldn't find the solution for it.

  • Try instead of `ax.scatter3d`, using `ax.scatter(x, y, z, c='r', marker='o')`. Check out the reference here https://pythonprogramming.net/matplotlib-3d-scatterplot-tutorial/. Also, do not forget to set the correct **axis ranges**. E.g. something like `plt.ylim(-.5, 1.5)`. – ABC Sep 17 '20 at 03:25
  • Does this answer your question? [ValueError: view limit minimum -35738.3640567 is less than 1 and is an invalid Matplotlib date value](https://stackoverflow.com/questions/57874226/valueerror-view-limit-minimum-35738-3640567-is-less-than-1-and-is-an-invalid-m) – ABC Sep 17 '20 at 03:28
  • 1
    @Raymond I am still getting the same error – SUIKSHA GAUTAM Sep 17 '20 at 15:06
  • Please post the whole code, so I may help. – ABC Sep 17 '20 at 15:55

0 Answers0