{"action":"created","comment":{"url":"https://api.github.com/repos/gonum/plot/pulls/comments/27268327","id":27268327,"diff_hunk":"@@ -0,0 +1,119 @@\n+// Copyright ©2015 The gonum Authors. All rights reserved.\n+// Use of this source code is governed by a BSD-style\n+// license that can be found in the LICENSE file.\n+\n+package vg_test\n+\n+import (\n+\t\"bytes\"\n+\t\"fmt\"\n+\t\"io\"\n+\t\"io/ioutil\"\n+\t\"log\"\n+\t\"os\"\n+\t\"path/filepath\"\n+\t\"testing\"\n+\n+\t\"github.com/gonum/plot\"\n+\t\"github.com/gonum/plot/plotter\"\n+\t\"github.com/gonum/plot/vg\"\n+\t\"github.com/gonum/plot/vg/draw\"\n+\t\"github.com/gonum/plot/vg/vgeps\"\n+\t\"github.com/gonum/plot/vg/vgimg\"\n+\t\"github.com/gonum/plot/vg/vgpdf\"\n+\t\"github.com/gonum/plot/vg/vgsvg\"\n+)\n+\n+// TestLineWidth tests output against test images generated by\n+// gen_width.go - these images have been visually inspected and\n+// validated.\n+func TestLineWidth(t *testing.T) {\n+\tformats := []string{\n+\t\t// TODO: Add logic to cope with run to run eps differences.\n+\t\t\"pdf\",\n+\t\t\"svg\",\n+\t\t\"png\",\n+\t\t\"tiff\",\n+\t\t\"jpg\",\n+\t}\n+\n+\tconst (\n+\t\twidth  = 100\n+\t\theight = 100\n+\t)\n+\n+\tfor _, w := range []vg.Length{-1, 0, 1} {","path":"vg/vg_test.go","position":45,"original_position":45,"commit_id":"3d02c81c965d9ab8ded1cbb3d58cce1171db8833","original_commit_id":"3d02c81c965d9ab8ded1cbb3d58cce1171db8833","user":{"login":"eaburns","id":235271,"avatar_url":"https://avatars.githubusercontent.com/u/235271?v=3","gravatar_id":"","url":"https://api.github.com/users/eaburns","html_url":"https://github.com/eaburns","followers_url":"https://api.github.com/users/eaburns/followers","following_url":"https://api.github.com/users/eaburns/following{/other_user}","gists_url":"https://api.github.com/users/eaburns/gists{/gist_id}","starred_url":"https://api.github.com/users/eaburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaburns/subscriptions","organizations_url":"https://api.github.com/users/eaburns/orgs","repos_url":"https://api.github.com/users/eaburns/repos","events_url":"https://api.github.com/users/eaburns/events{/privacy}","received_events_url":"https://api.github.com/users/eaburns/received_events","type":"User","site_admin":false},"body":"How would you feel about parsing the width and format out of the testdata file name? Then if you add new formats you don't have to modify both the gen script and this file.","created_at":"2015-03-27T00:14:01Z","updated_at":"2015-03-27T00:14:01Z","html_url":"https://github.com/gonum/plot/pull/186#discussion_r27268327","pull_request_url":"https://api.github.com/repos/gonum/plot/pulls/186","_links":{"self":{"href":"https://api.github.com/repos/gonum/plot/pulls/comments/27268327"},"html":{"href":"https://github.com/gonum/plot/pull/186#discussion_r27268327"},"pull_request":{"href":"https://api.github.com/repos/gonum/plot/pulls/186"}}},"pull_request":{"url":"https://api.github.com/repos/gonum/plot/pulls/186","id":31987655,"html_url":"https://github.com/gonum/plot/pull/186","diff_url":"https://github.com/gonum/plot/pull/186.diff","patch_url":"https://github.com/gonum/plot/pull/186.patch","issue_url":"https://api.github.com/repos/gonum/plot/issues/186","number":186,"state":"open","locked":false,"title":"vg/...: don't stroke paths with width <= 0","user":{"login":"kortschak","id":275221,"avatar_url":"https://avatars.githubusercontent.com/u/275221?v=3","gravatar_id":"","url":"https://api.github.com/users/kortschak","html_url":"https://github.com/kortschak","followers_url":"https://api.github.com/users/kortschak/followers","following_url":"https://api.github.com/users/kortschak/following{/other_user}","gists_url":"https://api.github.com/users/kortschak/gists{/gist_id}","starred_url":"https://api.github.com/users/kortschak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kortschak/subscriptions","organizations_url":"https://api.github.com/users/kortschak/orgs","repos_url":"https://api.github.com/users/kortschak/repos","events_url":"https://api.github.com/users/kortschak/events{/privacy}","received_events_url":"https://api.github.com/users/kortschak/received_events","type":"User","site_admin":false},"body":"Also improve vg.Canvas documentation.\r\n\r\nFixes #143.\r\n\r\nvg/recorder is left untouched since it is also included as a debugging tool and negative widths may be something people want to see.\r\n\r\nWondering about tests?\r\n\r\n@eaburns ","created_at":"2015-03-26T03:56:01Z","updated_at":"2015-03-27T00:14:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e5215a4ecd3cf6161d61577fda8af065d480e9c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gonum/plot/pulls/186/commits","review_comments_url":"https://api.github.com/repos/gonum/plot/pulls/186/comments","review_comment_url":"https://api.github.com/repos/gonum/plot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gonum/plot/issues/186/comments","statuses_url":"https://api.github.com/repos/gonum/plot/statuses/3d02c81c965d9ab8ded1cbb3d58cce1171db8833","head":{"label":"gonum:negative-width","ref":"negative-width","sha":"3d02c81c965d9ab8ded1cbb3d58cce1171db8833","user":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"repo":{"id":11601889,"name":"plot","full_name":"gonum/plot","owner":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gonum/plot","description":"A repository for plotting and visualizing data","fork":false,"url":"https://api.github.com/repos/gonum/plot","forks_url":"https://api.github.com/repos/gonum/plot/forks","keys_url":"https://api.github.com/repos/gonum/plot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonum/plot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonum/plot/teams","hooks_url":"https://api.github.com/repos/gonum/plot/hooks","issue_events_url":"https://api.github.com/repos/gonum/plot/issues/events{/number}","events_url":"https://api.github.com/repos/gonum/plot/events","assignees_url":"https://api.github.com/repos/gonum/plot/assignees{/user}","branches_url":"https://api.github.com/repos/gonum/plot/branches{/branch}","tags_url":"https://api.github.com/repos/gonum/plot/tags","blobs_url":"https://api.github.com/repos/gonum/plot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonum/plot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonum/plot/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonum/plot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonum/plot/statuses/{sha}","languages_url":"https://api.github.com/repos/gonum/plot/languages","stargazers_url":"https://api.github.com/repos/gonum/plot/stargazers","contributors_url":"https://api.github.com/repos/gonum/plot/contributors","subscribers_url":"https://api.github.com/repos/gonum/plot/subscribers","subscription_url":"https://api.github.com/repos/gonum/plot/subscription","commits_url":"https://api.github.com/repos/gonum/plot/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonum/plot/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonum/plot/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonum/plot/issues/comments{/number}","contents_url":"https://api.github.com/repos/gonum/plot/contents/{+path}","compare_url":"https://api.github.com/repos/gonum/plot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonum/plot/merges","archive_url":"https://api.github.com/repos/gonum/plot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonum/plot/downloads","issues_url":"https://api.github.com/repos/gonum/plot/issues{/number}","pulls_url":"https://api.github.com/repos/gonum/plot/pulls{/number}","milestones_url":"https://api.github.com/repos/gonum/plot/milestones{/number}","notifications_url":"https://api.github.com/repos/gonum/plot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonum/plot/labels{/name}","releases_url":"https://api.github.com/repos/gonum/plot/releases{/id}","created_at":"2013-07-23T07:01:13Z","updated_at":"2015-03-26T23:20:46Z","pushed_at":"2015-03-26T23:58:30Z","git_url":"git://github.com/gonum/plot.git","ssh_url":"git@github.com:gonum/plot.git","clone_url":"https://github.com/gonum/plot.git","svn_url":"https://github.com/gonum/plot","homepage":"","size":2606,"stargazers_count":19,"watchers_count":19,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":36,"forks":7,"open_issues":36,"watchers":19,"default_branch":"master"}},"base":{"label":"gonum:master","ref":"master","sha":"4e9da51fe13917c82b5ae6f98a05cc17678f76ff","user":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"repo":{"id":11601889,"name":"plot","full_name":"gonum/plot","owner":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gonum/plot","description":"A repository for plotting and visualizing data","fork":false,"url":"https://api.github.com/repos/gonum/plot","forks_url":"https://api.github.com/repos/gonum/plot/forks","keys_url":"https://api.github.com/repos/gonum/plot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonum/plot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonum/plot/teams","hooks_url":"https://api.github.com/repos/gonum/plot/hooks","issue_events_url":"https://api.github.com/repos/gonum/plot/issues/events{/number}","events_url":"https://api.github.com/repos/gonum/plot/events","assignees_url":"https://api.github.com/repos/gonum/plot/assignees{/user}","branches_url":"https://api.github.com/repos/gonum/plot/branches{/branch}","tags_url":"https://api.github.com/repos/gonum/plot/tags","blobs_url":"https://api.github.com/repos/gonum/plot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonum/plot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonum/plot/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonum/plot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonum/plot/statuses/{sha}","languages_url":"https://api.github.com/repos/gonum/plot/languages","stargazers_url":"https://api.github.com/repos/gonum/plot/stargazers","contributors_url":"https://api.github.com/repos/gonum/plot/contributors","subscribers_url":"https://api.github.com/repos/gonum/plot/subscribers","subscription_url":"https://api.github.com/repos/gonum/plot/subscription","commits_url":"https://api.github.com/repos/gonum/plot/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonum/plot/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonum/plot/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonum/plot/issues/comments{/number}","contents_url":"https://api.github.com/repos/gonum/plot/contents/{+path}","compare_url":"https://api.github.com/repos/gonum/plot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonum/plot/merges","archive_url":"https://api.github.com/repos/gonum/plot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonum/plot/downloads","issues_url":"https://api.github.com/repos/gonum/plot/issues{/number}","pulls_url":"https://api.github.com/repos/gonum/plot/pulls{/number}","milestones_url":"https://api.github.com/repos/gonum/plot/milestones{/number}","notifications_url":"https://api.github.com/repos/gonum/plot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonum/plot/labels{/name}","releases_url":"https://api.github.com/repos/gonum/plot/releases{/id}","created_at":"2013-07-23T07:01:13Z","updated_at":"2015-03-26T23:20:46Z","pushed_at":"2015-03-26T23:58:30Z","git_url":"git://github.com/gonum/plot.git","ssh_url":"git@github.com:gonum/plot.git","clone_url":"https://github.com/gonum/plot.git","svn_url":"https://github.com/gonum/plot","homepage":"","size":2606,"stargazers_count":19,"watchers_count":19,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":36,"forks":7,"open_issues":36,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gonum/plot/pulls/186"},"html":{"href":"https://github.com/gonum/plot/pull/186"},"issue":{"href":"https://api.github.com/repos/gonum/plot/issues/186"},"comments":{"href":"https://api.github.com/repos/gonum/plot/issues/186/comments"},"review_comments":{"href":"https://api.github.com/repos/gonum/plot/pulls/186/comments"},"review_comment":{"href":"https://api.github.com/repos/gonum/plot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gonum/plot/pulls/186/commits"},"statuses":{"href":"https://api.github.com/repos/gonum/plot/statuses/3d02c81c965d9ab8ded1cbb3d58cce1171db8833"}}}}