<commit_before>import numpy as np
import pandas as pd
import pyqtgraph as pg

from pyqtgraph.Qt import QtGui, QtCore

from graphysio.legend import LegendItem
from graphysio.utils import Colors
from graphysio.plotwidgets import curves


class TimeAxisItem(pg.AxisItem):
    def tickStrings(self, values, scale, spacing):
        ret = []
        for i, value in enumerate(values):
            value = value / 1e6 # convert from ns to ms
            date = QtCore.QDateTime.fromMSecsSinceEpoch(value)
            date = date.toTimeSpec(QtCore.Qt.UTC)
            if i < 1:
                datestr = date.toString("dd/MM/yyyy\nhh:mm:ss.zzz")
            else:
                datestr = date.toString("hh:mm:ss.zzz")
            ret.append(datestr)
        return ret


class PlotWidget(pg.PlotWidget):
    def __init__(self, name, parent=None):<commit_msg>Add date to all x axis labels. It's easier to read when we have data spanning over several days.<commit_after>import numpy as np
import pandas as pd
import pyqtgraph as pg

from pyqtgraph.Qt import QtGui, QtCore

from graphysio.legend import LegendItem
from graphysio.utils import Colors
from graphysio.plotwidgets import curves


class TimeAxisItem(pg.AxisItem):
    def tickStrings(self, values, scale, spacing):
        ret = []
        for i, value in enumerate(values):
            value = value / 1e6 # convert from ns to ms
            date = QtCore.QDateTime.fromMSecsSinceEpoch(value)
            date = date.toTimeSpec(QtCore.Qt.UTC)
            datestr = date.toString("dd/MM/yyyy\nhh:mm:ss.zzz")
            ret.append(datestr)
        return ret


class PlotWidget(pg.PlotWidget):
    def __init__(self, name, parent=None):
{'fraction_non_alphanumeric': 0.08466548253404381, 'fraction_numerical': 0.002960331557134399, 'mean_word_length': 2.7472283813747227, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3611104', 'n_tokens_mistral': 527, 'n_tokens_neox': 506, 'n_words': 153}