From 2d3a7074a06197b4419d23ab7bce17bcbe23bd0c Mon Sep 17 00:00:00 2001 From: foobarbecue Date: Sun, 26 Jul 2015 13:02:28 -0600 Subject: [PATCH] Don't show microseconds on dts plot. --- dts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dts.py b/dts.py index 44bd082..6f8e068 100644 --- a/dts.py +++ b/dts.py @@ -72,6 +72,7 @@ def plot_dts(dts_dataframe, min_dist=None, max_dist=None, min_time=None, max_tim #For some reason an extra tick is created beyond the end of the data. Remove it using [:-1]. xlocs, xlabels = xlocs[:-1], xlabels[:-1] xdates = pltdata.iloc[0,xlocs].index + xdates = [ts.strftime('%Y-%m-%d %H:%M') for ts in xdates] ylocs, ylabels = pyplot.yticks() ylocs, ylabels = ylocs[:-1], ylabels[:-1] ydists = pltdata.iloc[ylocs,0].index @@ -88,4 +89,4 @@ def read_and_plot_pwrrat(dtsdir, **kwargs): antistokes = read_ddf_col(dtsdir, ddf_column=2).astype(dtype=float) ratio = 1/numpy.log(stokes/antistokes) ratio_trimmed = plot_dts(ratio, **kwargs) - return ratio_trimmed \ No newline at end of file + return ratio_trimmed