I'm trying to use plot_date to plot some USGS daily flow data. I seem to have hit a bug in the plotting where large spikes in data are not being plotted at all scales.
For example in the attached data file there is a spike in the flow that hits a maximum of 30700 on 1998-10-20. When plotted with the commands below this portion of the dataset does not show up. If I drag the plot window to make the x axis 2 to 3 times wider than normal there is point at which this data spike suddenly appears. This problem doesn't exist if I use a symbol like .,+ etc only with lines.
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
qfile = '08176500.txt'
#q_file = qfile.split('.').split('\\')[-1]
q_ts = np.genfromtxt(qfile,comments='#',dtype=None,usecols=(2,3),names='dates,discharge')
dt = np.array([datetime.date(year=int(date.split('-')), month=int(date.split('-')), day=int(date.split('-'))) for date in q_ts['dates']])
fig = plt.figure()
ax = fig.add_subplot(111)
Any help is appreciated.
From: Eric Firing <efiring@ha...> - 2010-05-24 18:48:44
On 05/24/2010 07:08 AM, Dharhas Pothina wrote:
> I'm trying to use plot_date to plot some USGS daily flow data. I seem to have hit a bug in the plotting where large spikes in data are not being plotted at all scales.
It's the known path simplification bug, which has been fixed in svn. If
you can't run an mpl built from svn, the workaround is to turn off path
rcParams['path.simplify'] = False
or the equivalent in the matplotlibrc file.
Get latest updates about Open Source Projects, Conferences and News.