{"action":"created","comment":{"url":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/31167803","id":31167803,"diff_hunk":"@@ -33,15 +33,26 @@ class MapCubeAnimator(imageanimator.BaseFuncAnimator):\n     colorbar: bool\n         Plot colorbar\n \n+    plot_function: function\n+        A function to call when each frame is plotted, the function must have","path":"sunpy/visualization/mapcubeanimator.py","position":5,"original_position":5,"commit_id":"b9d61310c1267664190a1c0a2e3f318090365777","original_commit_id":"b9d61310c1267664190a1c0a2e3f318090365777","user":{"login":"wafels","id":983575,"avatar_url":"https://avatars.githubusercontent.com/u/983575?v=3","gravatar_id":"","url":"https://api.github.com/users/wafels","html_url":"https://github.com/wafels","followers_url":"https://api.github.com/users/wafels/followers","following_url":"https://api.github.com/users/wafels/following{/other_user}","gists_url":"https://api.github.com/users/wafels/gists{/gist_id}","starred_url":"https://api.github.com/users/wafels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wafels/subscriptions","organizations_url":"https://api.github.com/users/wafels/orgs","repos_url":"https://api.github.com/users/wafels/repos","events_url":"https://api.github.com/users/wafels/events{/privacy}","received_events_url":"https://api.github.com/users/wafels/received_events","type":"User","site_admin":false},"body":"What do you mean by \"frame\"?  Do you mean \r\n\r\n\"A function to call when each Map from the MapCube is plotted\"\r\n\r\nor does frame have another technical meaning.  Also, I think an example here would be very useful.\r\n","created_at":"2015-05-27T18:55:25Z","updated_at":"2015-05-27T18:55:25Z","html_url":"https://github.com/sunpy/sunpy/pull/1423#discussion_r31167803","pull_request_url":"https://api.github.com/repos/sunpy/sunpy/pulls/1423","_links":{"self":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/31167803"},"html":{"href":"https://github.com/sunpy/sunpy/pull/1423#discussion_r31167803"},"pull_request":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1423"}}},"pull_request":{"url":"https://api.github.com/repos/sunpy/sunpy/pulls/1423","id":36323102,"html_url":"https://github.com/sunpy/sunpy/pull/1423","diff_url":"https://github.com/sunpy/sunpy/pull/1423.diff","patch_url":"https://github.com/sunpy/sunpy/pull/1423.patch","issue_url":"https://api.github.com/repos/sunpy/sunpy/issues/1423","number":1423,"state":"open","locked":false,"title":"Add plot_function argument to MapCubeAnimator","user":{"login":"Cadair","id":1391051,"avatar_url":"https://avatars.githubusercontent.com/u/1391051?v=3","gravatar_id":"","url":"https://api.github.com/users/Cadair","html_url":"https://github.com/Cadair","followers_url":"https://api.github.com/users/Cadair/followers","following_url":"https://api.github.com/users/Cadair/following{/other_user}","gists_url":"https://api.github.com/users/Cadair/gists{/gist_id}","starred_url":"https://api.github.com/users/Cadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cadair/subscriptions","organizations_url":"https://api.github.com/users/Cadair/orgs","repos_url":"https://api.github.com/users/Cadair/repos","events_url":"https://api.github.com/users/Cadair/events{/privacy}","received_events_url":"https://api.github.com/users/Cadair/received_events","type":"User","site_admin":false},"body":"This allows the user to pass a custom plotting function to MapCubeAnimator which will be called for each animation step. It allows the following:\r\n\r\n```python\r\nmapc = sunpy.map.Map('/home/stuart/sunpy/data/aia_lev1_*fits', cube=True)\r\ndef my_plot(fig, ax, map):\r\n    l = map.draw_grid()\r\n    return l\r\nmapc.peek(plot_function=my_plot)\r\n```\r\n\r\nAssociated with this change, is something that I have wanted to do for a while but not had need to, it makes `draw_grid` and `draw_limb` return sensible things, `draw_grid` now returns in a consistent way with `pyplot.plot()` and `draw_limb` returns the patch object.\r\n\r\nThis sprung out of #1412 ","created_at":"2015-05-27T16:34:50Z","updated_at":"2015-05-27T18:55:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5149f9b904ff5ee1ca2b315be312dd93e24285b3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sunpy/sunpy/pulls/1423/commits","review_comments_url":"https://api.github.com/repos/sunpy/sunpy/pulls/1423/comments","review_comment_url":"https://api.github.com/repos/sunpy/sunpy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sunpy/sunpy/issues/1423/comments","statuses_url":"https://api.github.com/repos/sunpy/sunpy/statuses/b9d61310c1267664190a1c0a2e3f318090365777","head":{"label":"Cadair:map_cube_func_plot","ref":"map_cube_func_plot","sha":"b9d61310c1267664190a1c0a2e3f318090365777","user":{"login":"Cadair","id":1391051,"avatar_url":"https://avatars.githubusercontent.com/u/1391051?v=3","gravatar_id":"","url":"https://api.github.com/users/Cadair","html_url":"https://github.com/Cadair","followers_url":"https://api.github.com/users/Cadair/followers","following_url":"https://api.github.com/users/Cadair/following{/other_user}","gists_url":"https://api.github.com/users/Cadair/gists{/gist_id}","starred_url":"https://api.github.com/users/Cadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cadair/subscriptions","organizations_url":"https://api.github.com/users/Cadair/orgs","repos_url":"https://api.github.com/users/Cadair/repos","events_url":"https://api.github.com/users/Cadair/events{/privacy}","received_events_url":"https://api.github.com/users/Cadair/received_events","type":"User","site_admin":false},"repo":{"id":4972804,"name":"sunpy","full_name":"Cadair/sunpy","owner":{"login":"Cadair","id":1391051,"avatar_url":"https://avatars.githubusercontent.com/u/1391051?v=3","gravatar_id":"","url":"https://api.github.com/users/Cadair","html_url":"https://github.com/Cadair","followers_url":"https://api.github.com/users/Cadair/followers","following_url":"https://api.github.com/users/Cadair/following{/other_user}","gists_url":"https://api.github.com/users/Cadair/gists{/gist_id}","starred_url":"https://api.github.com/users/Cadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cadair/subscriptions","organizations_url":"https://api.github.com/users/Cadair/orgs","repos_url":"https://api.github.com/users/Cadair/repos","events_url":"https://api.github.com/users/Cadair/events{/privacy}","received_events_url":"https://api.github.com/users/Cadair/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Cadair/sunpy","description":"SunPy - Python for solar physics","fork":true,"url":"https://api.github.com/repos/Cadair/sunpy","forks_url":"https://api.github.com/repos/Cadair/sunpy/forks","keys_url":"https://api.github.com/repos/Cadair/sunpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cadair/sunpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cadair/sunpy/teams","hooks_url":"https://api.github.com/repos/Cadair/sunpy/hooks","issue_events_url":"https://api.github.com/repos/Cadair/sunpy/issues/events{/number}","events_url":"https://api.github.com/repos/Cadair/sunpy/events","assignees_url":"https://api.github.com/repos/Cadair/sunpy/assignees{/user}","branches_url":"https://api.github.com/repos/Cadair/sunpy/branches{/branch}","tags_url":"https://api.github.com/repos/Cadair/sunpy/tags","blobs_url":"https://api.github.com/repos/Cadair/sunpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cadair/sunpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cadair/sunpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cadair/sunpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cadair/sunpy/statuses/{sha}","languages_url":"https://api.github.com/repos/Cadair/sunpy/languages","stargazers_url":"https://api.github.com/repos/Cadair/sunpy/stargazers","contributors_url":"https://api.github.com/repos/Cadair/sunpy/contributors","subscribers_url":"https://api.github.com/repos/Cadair/sunpy/subscribers","subscription_url":"https://api.github.com/repos/Cadair/sunpy/subscription","commits_url":"https://api.github.com/repos/Cadair/sunpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cadair/sunpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cadair/sunpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cadair/sunpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cadair/sunpy/contents/{+path}","compare_url":"https://api.github.com/repos/Cadair/sunpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cadair/sunpy/merges","archive_url":"https://api.github.com/repos/Cadair/sunpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cadair/sunpy/downloads","issues_url":"https://api.github.com/repos/Cadair/sunpy/issues{/number}","pulls_url":"https://api.github.com/repos/Cadair/sunpy/pulls{/number}","milestones_url":"https://api.github.com/repos/Cadair/sunpy/milestones{/number}","notifications_url":"https://api.github.com/repos/Cadair/sunpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cadair/sunpy/labels{/name}","releases_url":"https://api.github.com/repos/Cadair/sunpy/releases{/id}","created_at":"2012-07-10T11:15:45Z","updated_at":"2015-04-30T16:12:04Z","pushed_at":"2015-05-27T16:41:40Z","git_url":"git://github.com/Cadair/sunpy.git","ssh_url":"git@github.com:Cadair/sunpy.git","clone_url":"https://github.com/Cadair/sunpy.git","svn_url":"https://github.com/Cadair/sunpy","homepage":"http://www.sunpy.org","size":53828,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sunpy:master","ref":"master","sha":"dcbcbe56640fc756fec3020784ed94bbe731d9a2","user":{"login":"sunpy","id":963197,"avatar_url":"https://avatars.githubusercontent.com/u/963197?v=3","gravatar_id":"","url":"https://api.github.com/users/sunpy","html_url":"https://github.com/sunpy","followers_url":"https://api.github.com/users/sunpy/followers","following_url":"https://api.github.com/users/sunpy/following{/other_user}","gists_url":"https://api.github.com/users/sunpy/gists{/gist_id}","starred_url":"https://api.github.com/users/sunpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunpy/subscriptions","organizations_url":"https://api.github.com/users/sunpy/orgs","repos_url":"https://api.github.com/users/sunpy/repos","events_url":"https://api.github.com/users/sunpy/events{/privacy}","received_events_url":"https://api.github.com/users/sunpy/received_events","type":"Organization","site_admin":false},"repo":{"id":2165383,"name":"sunpy","full_name":"sunpy/sunpy","owner":{"login":"sunpy","id":963197,"avatar_url":"https://avatars.githubusercontent.com/u/963197?v=3","gravatar_id":"","url":"https://api.github.com/users/sunpy","html_url":"https://github.com/sunpy","followers_url":"https://api.github.com/users/sunpy/followers","following_url":"https://api.github.com/users/sunpy/following{/other_user}","gists_url":"https://api.github.com/users/sunpy/gists{/gist_id}","starred_url":"https://api.github.com/users/sunpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunpy/subscriptions","organizations_url":"https://api.github.com/users/sunpy/orgs","repos_url":"https://api.github.com/users/sunpy/repos","events_url":"https://api.github.com/users/sunpy/events{/privacy}","received_events_url":"https://api.github.com/users/sunpy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sunpy/sunpy","description":"SunPy - Python for solar physics","fork":false,"url":"https://api.github.com/repos/sunpy/sunpy","forks_url":"https://api.github.com/repos/sunpy/sunpy/forks","keys_url":"https://api.github.com/repos/sunpy/sunpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sunpy/sunpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sunpy/sunpy/teams","hooks_url":"https://api.github.com/repos/sunpy/sunpy/hooks","issue_events_url":"https://api.github.com/repos/sunpy/sunpy/issues/events{/number}","events_url":"https://api.github.com/repos/sunpy/sunpy/events","assignees_url":"https://api.github.com/repos/sunpy/sunpy/assignees{/user}","branches_url":"https://api.github.com/repos/sunpy/sunpy/branches{/branch}","tags_url":"https://api.github.com/repos/sunpy/sunpy/tags","blobs_url":"https://api.github.com/repos/sunpy/sunpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sunpy/sunpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sunpy/sunpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sunpy/sunpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sunpy/sunpy/statuses/{sha}","languages_url":"https://api.github.com/repos/sunpy/sunpy/languages","stargazers_url":"https://api.github.com/repos/sunpy/sunpy/stargazers","contributors_url":"https://api.github.com/repos/sunpy/sunpy/contributors","subscribers_url":"https://api.github.com/repos/sunpy/sunpy/subscribers","subscription_url":"https://api.github.com/repos/sunpy/sunpy/subscription","commits_url":"https://api.github.com/repos/sunpy/sunpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sunpy/sunpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sunpy/sunpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sunpy/sunpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/sunpy/sunpy/contents/{+path}","compare_url":"https://api.github.com/repos/sunpy/sunpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sunpy/sunpy/merges","archive_url":"https://api.github.com/repos/sunpy/sunpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sunpy/sunpy/downloads","issues_url":"https://api.github.com/repos/sunpy/sunpy/issues{/number}","pulls_url":"https://api.github.com/repos/sunpy/sunpy/pulls{/number}","milestones_url":"https://api.github.com/repos/sunpy/sunpy/milestones{/number}","notifications_url":"https://api.github.com/repos/sunpy/sunpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sunpy/sunpy/labels{/name}","releases_url":"https://api.github.com/repos/sunpy/sunpy/releases{/id}","created_at":"2011-08-06T15:34:08Z","updated_at":"2015-05-22T01:21:35Z","pushed_at":"2015-05-27T16:41:41Z","git_url":"git://github.com/sunpy/sunpy.git","ssh_url":"git@github.com:sunpy/sunpy.git","clone_url":"https://github.com/sunpy/sunpy.git","svn_url":"https://github.com/sunpy/sunpy","homepage":"http://www.sunpy.org","size":145602,"stargazers_count":190,"watchers_count":190,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":130,"mirror_url":null,"open_issues_count":193,"forks":130,"open_issues":193,"watchers":190,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1423"},"html":{"href":"https://github.com/sunpy/sunpy/pull/1423"},"issue":{"href":"https://api.github.com/repos/sunpy/sunpy/issues/1423"},"comments":{"href":"https://api.github.com/repos/sunpy/sunpy/issues/1423/comments"},"review_comments":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1423/comments"},"review_comment":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1423/commits"},"statuses":{"href":"https://api.github.com/repos/sunpy/sunpy/statuses/b9d61310c1267664190a1c0a2e3f318090365777"}}}}