Closed lkugler closed 2 years ago
import numpy as np
import datetime as dt
import pandas as pd
import matplotlib as mpl
mpl.use('agg')
import matplotlib.pyplot as plt
import proplot as pplt
fig, ax = pplt.subplots()
init = dt.datetime(2000, 1, 1)
ax.plot(init, 0, marker='>')
Produces
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
fig, ax = pplt.subplots()
init = np.datetime64(dt.datetime(2000, 1, 1)) # <------ add np.datetime64
ax.plot(init, 0, marker='>')
Matplotlib version 3.4.3 proplot 0.9.5 Pandas 1.3.4
Converting the input to np.datetime64 should not be necessary, as it is not required with default matplotlib, right?
Version 0.9.5.post332
pip install git+https://github.com/proplot-dev/proplot.git
The latest stable proplot version 0.9.7 finally addresses this issue (#309). Just adds matplotlib / numpy dependency fixes to version 0.9.5 -- have yet to merge other master branch improvements.
I have just updated proplot to version 0.9.7 from conda forge but the error remains, unfortunately.
Oh you're right, sorry. Lumped this in with a bunch of other proplot version issue threads I was reviewing. Seems this is actually related to #320 (which was fixed on master).
Description
I want to warn others that this combination of Matplotlib + proplot + pandas doesnt work.
Steps to reproduce
Produces
Equivalent (working) steps in matplotlib
Proplot version
Matplotlib version 3.4.3 (same for 3.5.3) proplot 0.9.5 Pandas 1.3.4