{"action":"created","comment":{"url":"https://api.github.com/repos/gonum/plot/pulls/comments/24785107","id":24785107,"diff_hunk":"@@ -0,0 +1,488 @@\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+//go:generate ./list\n+\n+package plotter\n+\n+import (\n+\t\"image/color\"\n+\t\"math\"\n+\t\"sort\"\n+\n+\t\"github.com/gonum/plot\"\n+\t\"github.com/gonum/plot/palette\"\n+\t\"github.com/gonum/plot/vg\"\n+\t\"github.com/gonum/plot/vg/draw\"\n+)\n+\n+// Contour implements the Plotter interface, drawing\n+// a contour plot of the values in the GridXYZ field. The\n+// row index is from top to bottom.\n+type Contour struct {\n+\tGridXYZ GridXYZ\n+\n+\t// Levels describes the contour heights to plot.\n+\tLevels []float64\n+\n+\t// LineStyle is the style of the contour lines.\n+\tdraw.LineStyle\n+\n+\t// Palette is the color palette used to render\n+\t// the heat map.\n+\tPalette palette.Palette\n+\n+\t// Underflow and Overflow are colors used to draw\n+\t// contours outside the dynamic range defined\n+\t// by Min and Max.\n+\tUnderflow color.Color\n+\tOverflow  color.Color\n+\n+\t// Min and Max define the dynamic range of the\n+\t// heat map.\n+\tMin, Max float64\n+}\n+\n+// NewContour creates as new contour plotter for the given data,\n+// using the provided palette.","path":"plotter/contour.go","position":null,"original_position":48,"commit_id":"6bceafc7007ae3ca89b01315de72161d9287bd81","original_commit_id":"69b177324a01514109ea320ef71ba7a4f85d46dc","user":{"login":"btracey","id":3680859,"avatar_url":"https://avatars.githubusercontent.com/u/3680859?v=3","gravatar_id":"","url":"https://api.github.com/users/btracey","html_url":"https://github.com/btracey","followers_url":"https://api.github.com/users/btracey/followers","following_url":"https://api.github.com/users/btracey/following{/other_user}","gists_url":"https://api.github.com/users/btracey/gists{/gist_id}","starred_url":"https://api.github.com/users/btracey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btracey/subscriptions","organizations_url":"https://api.github.com/users/btracey/orgs","repos_url":"https://api.github.com/users/btracey/repos","events_url":"https://api.github.com/users/btracey/events{/privacy}","received_events_url":"https://api.github.com/users/btracey/received_events","type":"User","site_admin":false},"body":"I don’t think hidden interface testing is ever obvious\n\nIt doesn’t need an extra type.\n\n> On Feb 16, 2015, at 4:20 PM, Dan Kortschak <notifications@github.com> wrote:\n> \n> In plotter/contour.go <https://github.com/gonum/plot/pull/15#discussion_r24784565>:\n> \n> > +\t// the heat map.\n> > +\tPalette palette.Palette\n> > +\n> > +\t// Underflow and Overflow are colors used to draw\n> > +\t// contours outside the dynamic range defined\n> > +\t// by Min and Max.\n> > +\tUnderflow color.Color\n> > +\tOverflow  color.Color\n> > +\n> > +\t// Min and Max define the dynamic range of the\n> > +\t// heat map.\n> > +\tMin, Max float64\n> > +}\n> > +\n> > +// NewContour creates as new contour plotter for the given data,\n> > +// using the provided palette.\n> Mmm. I guess so. I would have thought it was pretty obvious, but I'll add a comment. I don't think it warrants an additional type in the godoc.\n> \n> —\n> Reply to this email directly or view it on GitHub <https://github.com/gonum/plot/pull/15/files#r24784565>.\n> \n\n","created_at":"2015-02-17T00:35:16Z","updated_at":"2015-02-17T00:35:16Z","html_url":"https://github.com/gonum/plot/pull/15#discussion_r24785107","pull_request_url":"https://api.github.com/repos/gonum/plot/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/gonum/plot/pulls/comments/24785107"},"html":{"href":"https://github.com/gonum/plot/pull/15#discussion_r24785107"},"pull_request":{"href":"https://api.github.com/repos/gonum/plot/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/gonum/plot/pulls/15","id":29148495,"html_url":"https://github.com/gonum/plot/pull/15","diff_url":"https://github.com/gonum/plot/pull/15.diff","patch_url":"https://github.com/gonum/plot/pull/15.patch","issue_url":"https://api.github.com/repos/gonum/plot/issues/15","number":15,"state":"open","locked":false,"title":"plotter: add HeatMap and Contour implementation","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":"","created_at":"2015-02-12T02:38:52Z","updated_at":"2015-02-17T00:35:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d2f3fb316c27cbadbf4d727102582e5a3578141","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gonum/plot/pulls/15/commits","review_comments_url":"https://api.github.com/repos/gonum/plot/pulls/15/comments","review_comment_url":"https://api.github.com/repos/gonum/plot/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gonum/plot/issues/15/comments","statuses_url":"https://api.github.com/repos/gonum/plot/statuses/6bceafc7007ae3ca89b01315de72161d9287bd81","head":{"label":"gonum:heat","ref":"heat","sha":"6bceafc7007ae3ca89b01315de72161d9287bd81","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-02-14T08:38:18Z","pushed_at":"2015-02-17T00:24:53Z","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":1498,"stargazers_count":8,"watchers_count":8,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":10,"forks":4,"open_issues":10,"watchers":8,"default_branch":"master"}},"base":{"label":"gonum:master","ref":"master","sha":"c9dbc56fff9e922984a5e6d5becf8036b402c07c","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-02-14T08:38:18Z","pushed_at":"2015-02-17T00:24:53Z","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":1498,"stargazers_count":8,"watchers_count":8,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":10,"forks":4,"open_issues":10,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gonum/plot/pulls/15"},"html":{"href":"https://github.com/gonum/plot/pull/15"},"issue":{"href":"https://api.github.com/repos/gonum/plot/issues/15"},"comments":{"href":"https://api.github.com/repos/gonum/plot/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/gonum/plot/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/gonum/plot/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gonum/plot/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/gonum/plot/statuses/6bceafc7007ae3ca89b01315de72161d9287bd81"}}}}