Hi all,
I am facing a very weird problem that I will try to describe as clear as possible.
I am running the following version of python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 29 2018, 19:04:46)
Type ‘copyright’, ‘credits’ or ‘license’ for more information
IPython 7.5.0 – An enhanced Interactive Python. Type ‘?’ for help.
I have some code that does some plotting and when it runs inside a cell, some (and not always the same) of the plotting functions will return the following error
/anaconda3/envs/PythonFresh/lib/python3.6/site-packages/matplotlib/dates.py in viewlim_to_dt(self)
1203 'often happens if you pass a non-datetime ’
1204 ‘value to an axis that has datetime units’
-> 1205 .format(vmin))
1206 return num2date(vmin, self.tz), num2date(vmax, self.tz)
1207
ValueError: view limit minimum -36805.66129843047 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
Now, the weird part is that the data frames do not have the problems that the error message conveys -and- when I call the relevant function from the console
start='2019-02-08 13:32:07';end='2019-02-08 13:33:22'
NeighborhoodA_2_b=define_drivetest(start,end,plot=True)
it never but never returns this error message. What the function does is to plot based on the indexes
def define_drivetest(initial, end,plot=False):
data_1=data_features[initial:end]
if (plot==True):
plt.plot(data['All-Latitude'][initial:end].values, data['All-Longitude'][initial:end].values,'.')
It looks to be a jupyter issue when the plotting happening inside the cells.
Have you ever had any similar issue?
Thanks a lot
Alex