{"action":"created","issue":{"url":"https://api.github.com/repos/nilmtk/nilmtk/issues/405","labels_url":"https://api.github.com/repos/nilmtk/nilmtk/issues/405/labels{/name}","comments_url":"https://api.github.com/repos/nilmtk/nilmtk/issues/405/comments","events_url":"https://api.github.com/repos/nilmtk/nilmtk/issues/405/events","html_url":"https://github.com/nilmtk/nilmtk/issues/405","id":86918784,"number":405,"title":"Combining and displaying apparent and reactive power data","user":{"login":"gjwo","id":12109990,"avatar_url":"https://avatars.githubusercontent.com/u/12109990?v=3","gravatar_id":"","url":"https://api.github.com/users/gjwo","html_url":"https://github.com/gjwo","followers_url":"https://api.github.com/users/gjwo/followers","following_url":"https://api.github.com/users/gjwo/following{/other_user}","gists_url":"https://api.github.com/users/gjwo/gists{/gist_id}","starred_url":"https://api.github.com/users/gjwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjwo/subscriptions","organizations_url":"https://api.github.com/users/gjwo/orgs","repos_url":"https://api.github.com/users/gjwo/repos","events_url":"https://api.github.com/users/gjwo/events{/privacy}","received_events_url":"https://api.github.com/users/gjwo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-10T10:27:17Z","updated_at":"2015-06-10T13:56:59Z","closed_at":null,"body":"My data contains two measurements per second, apparent & reactive power, I would like to be able to view them as two lines on the same graph (with the axes adjusted appropriately), and to be able to change the time period of the graph to be able to zoom in and out on features. Can this be done? are there any examples of how to do it? My data is available here https://github.com/gjwo/nilm_gjw_data/blob/master/HDF5/nilm_gjw_data.hdf5\r\n"},"comment":{"url":"https://api.github.com/repos/nilmtk/nilmtk/issues/comments/110763854","html_url":"https://github.com/nilmtk/nilmtk/issues/405#issuecomment-110763854","issue_url":"https://api.github.com/repos/nilmtk/nilmtk/issues/405","id":110763854,"user":{"login":"gjwo","id":12109990,"avatar_url":"https://avatars.githubusercontent.com/u/12109990?v=3","gravatar_id":"","url":"https://api.github.com/users/gjwo","html_url":"https://github.com/gjwo","followers_url":"https://api.github.com/users/gjwo/followers","following_url":"https://api.github.com/users/gjwo/following{/other_user}","gists_url":"https://api.github.com/users/gjwo/gists{/gist_id}","starred_url":"https://api.github.com/users/gjwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjwo/subscriptions","organizations_url":"https://api.github.com/users/gjwo/orgs","repos_url":"https://api.github.com/users/gjwo/repos","events_url":"https://api.github.com/users/gjwo/events{/privacy}","received_events_url":"https://api.github.com/users/gjwo/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T13:56:59Z","updated_at":"2015-06-10T13:56:59Z","body":"OK did that\r\n```python\r\n   def __repr__(self):\r\n        string = super(ElecMeter, self).__repr__()\r\n        # Now add list of appliances...\r\n        string = string[:-1]  # remove last bracket\r\n\r\n        # Site meter\r\n        if self.metadata.get('site_meter'):\r\n            string += ', site_meter'\r\n\r\n        # Appliances\r\n        string += ', appliances={}'.format(self.appliances)\r\n\r\n        # METER ROOM\r\n        room = self.metadata.get('room')\r\n        print(room)\r\n        print(type(room))\r\n        if room:\r\n            string += ', room={}'.format(room['name'])\r\n            try:\r\n                string += '{:d}'.format(room['instance'])\r\n            except KeyError:\r\n                pass\r\n\r\n        string += ')'\r\n        return string\r\n```\r\nand renamed the elecmeter.pyc file, but the output hasn't changed neither has th eline number which must mean I am modifying the wrong file, which directory is elecmeter.py in?\r\n```python\r\nIn [6]:\r\n\r\nelec.plot()\r\n​\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\nc:\\Users\\GJWood\\Anaconda\\lib\\site-packages\\IPython\\core\\formatters.pyc in __call__(self, obj)\r\n    693                 type_pprinters=self.type_printers,\r\n    694                 deferred_pprinters=self.deferred_printers)\r\n--> 695             printer.pretty(obj)\r\n    696             printer.flush()\r\n    697             return stream.getvalue()\r\n\r\nc:\\Users\\GJWood\\Anaconda\\lib\\site-packages\\IPython\\lib\\pretty.pyc in pretty(self, obj)\r\n    384                 if cls in self.type_pprinters:\r\n    385                     # printer registered in self.type_pprinters\r\n--> 386                     return self.type_pprinters[cls](obj, self, cycle)\r\n    387                 else:\r\n    388                     # deferred printer\r\n\r\nc:\\Users\\GJWood\\Anaconda\\lib\\site-packages\\IPython\\lib\\pretty.pyc in inner(obj, p, cycle)\r\n    568                 p.text(',')\r\n    569                 p.breakable()\r\n--> 570             p.pretty(x)\r\n    571         if len(obj) == 1 and type(obj) is tuple:\r\n    572             # Special case for 1-item tuples.\r\n\r\nc:\\Users\\GJWood\\Anaconda\\lib\\site-packages\\IPython\\lib\\pretty.pyc in pretty(self, obj)\r\n    399                             if callable(meth):\r\n    400                                 return meth(obj, self, cycle)\r\n--> 401             return _default_pprint(obj, self, cycle)\r\n    402         finally:\r\n    403             self.end_group()\r\n\r\nc:\\Users\\GJWood\\Anaconda\\lib\\site-packages\\IPython\\lib\\pretty.pyc in _default_pprint(obj, p, cycle)\r\n    519     if _safe_getattr(klass, '__repr__', None) not in _baseclass_reprs:\r\n    520         # A user-provided repr. Find newlines and replace them with p.break_()\r\n--> 521         _repr_pprint(obj, p, cycle)\r\n    522         return\r\n    523     p.begin_group(1, '<')\r\n\r\nc:\\Users\\GJWood\\Anaconda\\lib\\site-packages\\IPython\\lib\\pretty.pyc in _repr_pprint(obj, p, cycle)\r\n    701     \"\"\"A pprint that just redirects to the normal repr function.\"\"\"\r\n    702     # Find newlines and replace them with p.break_()\r\n--> 703     output = repr(obj)\r\n    704     for idx,output_line in enumerate(output.splitlines()):\r\n    705         if idx:\r\n\r\nc:\\users\\gjwood\\nilmtk\\nilmtk\\elecmeter.pyc in __repr__(self)\r\n    307         room = self.metadata.get('room')\r\n    308         if room:\r\n--> 309             string += ', room={}'.format(room['name'])\r\n    310             try:\r\n    311                 string += '{:d}'.format(room['instance'])\r\n\r\nTypeError: string indices must be integers, not str\r\n```"}}