{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4259","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4259/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4259/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4259/events","html_url":"https://github.com/matplotlib/matplotlib/pull/4259","id":63478403,"number":4259,"title":"Implementation of Issue #4044. Added ScientificTable and ScientificCell subclasses.","user":{"login":"dkua","id":1531139,"avatar_url":"https://avatars.githubusercontent.com/u/1531139?v=3","gravatar_id":"","url":"https://api.github.com/users/dkua","html_url":"https://github.com/dkua","followers_url":"https://api.github.com/users/dkua/followers","following_url":"https://api.github.com/users/dkua/following{/other_user}","gists_url":"https://api.github.com/users/dkua/gists{/gist_id}","starred_url":"https://api.github.com/users/dkua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkua/subscriptions","organizations_url":"https://api.github.com/users/dkua/orgs","repos_url":"https://api.github.com/users/dkua/repos","events_url":"https://api.github.com/users/dkua/events{/privacy}","received_events_url":"https://api.github.com/users/dkua/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/needs_review","name":"needs_review","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/18","html_url":"https://github.com/matplotlib/matplotlib/milestones/next%20point%20release","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/18/labels","id":970105,"number":18,"title":"next point release","description":"Next minor release.","creator":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars.githubusercontent.com/u/199813?v=3","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":177,"closed_issues":86,"state":"open","created_at":"2015-02-07T21:22:30Z","updated_at":"2015-03-27T04:34:18Z","due_on":"2015-07-06T04:00:00Z","closed_at":null},"comments":12,"created_at":"2015-03-22T02:24:38Z","updated_at":"2015-03-27T20:20:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/4259","html_url":"https://github.com/matplotlib/matplotlib/pull/4259","diff_url":"https://github.com/matplotlib/matplotlib/pull/4259.diff","patch_url":"https://github.com/matplotlib/matplotlib/pull/4259.patch"},"body":"This implements the requested feature in issue #4044 \r\n\r\nTwo subclasses, `ScientificTable` and `ScientificCell`, were created of `Table` and `Cell` respectively. An extra kwarg was added to the `table()` factory function for choosing the type of `Table` to use.\r\n\r\nThe factory function and the table types were tested with the `test_table_types` test in `test_table.py`. A new test image was also added. The test passes in Ubuntu 12.04 64-bit.\r\n\r\nThe feature was implemented by having `ScientificCell` extend `Cell` with an additional method `get_path()` which simply returns a new `Path` instance that doesn't draw a line when moving between the vertices that make up a vertical line.\r\n\r\nThis works because `Cell.draw()` calls `Rectangle.draw()` which calls `self.get_path()`.  However `Cell` passes into `Rectangle.draw()` the arguments `self, renderer`. So the `self.get_path()` call is actually calling `Cell` but since it doesn't have that method it uses it's super class' definition which is `Rectangle`. By creating the new subclass with our own `get_path()` method we can implement this feature while following the same logic."},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/87076990","html_url":"https://github.com/matplotlib/matplotlib/pull/4259#issuecomment-87076990","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4259","id":87076990,"user":{"login":"efiring","id":85125,"avatar_url":"https://avatars.githubusercontent.com/u/85125?v=3","gravatar_id":"","url":"https://api.github.com/users/efiring","html_url":"https://github.com/efiring","followers_url":"https://api.github.com/users/efiring/followers","following_url":"https://api.github.com/users/efiring/following{/other_user}","gists_url":"https://api.github.com/users/efiring/gists{/gist_id}","starred_url":"https://api.github.com/users/efiring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efiring/subscriptions","organizations_url":"https://api.github.com/users/efiring/orgs","repos_url":"https://api.github.com/users/efiring/repos","events_url":"https://api.github.com/users/efiring/events{/privacy}","received_events_url":"https://api.github.com/users/efiring/received_events","type":"User","site_admin":false},"created_at":"2015-03-27T20:20:26Z","updated_at":"2015-03-27T20:20:26Z","body":"Yes, with a cell-based approach, that would be better.  But might it make sense to simply have one Cell class that can put lines on any or all of the sides?  The general specification would be a string, e.g. 'LRBT' for all sides, 'BT' for bottom and top, etc.  Aliases could be 'open' for no lines (''), 'closed' for all sides, 'horizontal' for horizontal lines ('BT'), and 'vertical' for vertical lines ('LR')."}}