{"action":"created","comment":{"url":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/178343956","pull_request_review_id":108396073,"id":178343956,"diff_hunk":"@@ -1001,25 +1001,60 @@ def _get_main_axes(self):\n         self._set_unit_in_axis(axes)\n         return axes\n \n-    def _set_unit_in_axis(self, axes):\n-        if self.unit_x_axis is not None:\n-            axes.coords[2].set_format_unit(self.unit_x_axis)\n-            axes.coords[2].set_ticks(exclude_overlapping=True)\n-        if self.unit_y_axis is not None:\n-            axes.coords[1].set_format_unit(self.unit_y_axis)\n-            axes.coords[1].set_ticks(exclude_overlapping=True)\n+    def _set_image_axes_units(self, unit_x_axis=None, unit_y_axis=None):\n+        if(unit_x_axis is not None):\n+            self.unit_x_axis = u.Unit(unit_x_axis)\n+        else:\n+            self.unit_x_axis = self.wcs.wcs.cunit[0]\n+\n+        if(unit_y_axis is not None):\n+            self.unit_y_axis = u.Unit(unit_y_axis)\n+        else:\n+            self.unit_y_axis = self.wcs.wcs.cunit[1]\n \n     def plot_start_image(self, ax):\n         \"\"\"Sets up plot of initial image.\"\"\"\n         imshow_args = {'interpolation': 'nearest',\n                        'origin': 'lower',\n                        }\n         imshow_args.update(self.imshow_kwargs)\n+        ax.ticklabel_format(style='sci')\n         im = ax.imshow(self.data[self.frame_index], **imshow_args)\n         if self.if_colorbar:\n             self._add_colorbar(im)\n         return im\n \n+    def plot_user_input(self, axes, tick_spacing, x_tick_position = None, y_tick_position = None,  xlabel = None, ylabel = None ):\n+        \"\"\"\"Lets the user set the tick spacing and tick labels with proper tick position\"\"\"\"\n+        self._set_image_axis_units(unit_x_axis, unit_y_axis)\n+        if self.unit_x_axis is not None:\n+            axes.coords[2].set_format_unit(self.unit_x_axis)\n+        if self.unit_y_axis is not None:\n+            axes.coords[1].set_format_unit(self.unit_y_axis)\n+\n+        axes.coords[2].set_ticks(spacing = tick_spacing * self.wcs.wcs.cunit[0], exclude_overlapping=True)\n+        axes.coords[1].set_ticks(spacing = tick_spacing * self.wcs.wcs.cunit[1], exclude_overlapping=True)","path":"sunpy/visualization/imageanimator.py","position":43,"original_position":43,"commit_id":"bc6ae7e1e9df5b69a50181b8a2dd5ea0005a2491","original_commit_id":"ff64fd7de0b99deb10dcbb2b5246ab8ecf1fbe3a","user":{"login":"prateekiiest","id":16035442,"avatar_url":"https://avatars0.githubusercontent.com/u/16035442?v=4","gravatar_id":"","url":"https://api.github.com/users/prateekiiest","html_url":"https://github.com/prateekiiest","followers_url":"https://api.github.com/users/prateekiiest/followers","following_url":"https://api.github.com/users/prateekiiest/following{/other_user}","gists_url":"https://api.github.com/users/prateekiiest/gists{/gist_id}","starred_url":"https://api.github.com/users/prateekiiest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateekiiest/subscriptions","organizations_url":"https://api.github.com/users/prateekiiest/orgs","repos_url":"https://api.github.com/users/prateekiiest/repos","events_url":"https://api.github.com/users/prateekiiest/events{/privacy}","received_events_url":"https://api.github.com/users/prateekiiest/received_events","type":"User","site_admin":false},"body":"We can use the user input, but the spacing will depend on the dimension of the input.\r\n\r\nThere are two cases \r\n* user input = None\r\n   use some default spacing = wcs.cunit\r\n\r\n* user input not None\r\n   for example if user input u.degree, if we use that in spacing, that might cause a large spacing \r\n   between two adjacent labels, which the user might not want. He may want a smaller spacing as \r\n   supported by u.arcsec or u.arcmin","created_at":"2018-03-30T18:24:55Z","updated_at":"2018-03-30T18:24:55Z","html_url":"https://github.com/sunpy/sunpy/pull/2566#discussion_r178343956","pull_request_url":"https://api.github.com/repos/sunpy/sunpy/pulls/2566","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/178343956"},"html":{"href":"https://github.com/sunpy/sunpy/pull/2566#discussion_r178343956"},"pull_request":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/2566"}},"in_reply_to_id":178277683},"pull_request":{"url":"https://api.github.com/repos/sunpy/sunpy/pulls/2566","id":178016137,"html_url":"https://github.com/sunpy/sunpy/pull/2566","diff_url":"https://github.com/sunpy/sunpy/pull/2566.diff","patch_url":"https://github.com/sunpy/sunpy/pull/2566.patch","issue_url":"https://api.github.com/repos/sunpy/sunpy/issues/2566","number":2566,"state":"open","locked":false,"title":"Ticklable Control and API update for ImageAnimator WCS ","user":{"login":"prateekiiest","id":16035442,"avatar_url":"https://avatars0.githubusercontent.com/u/16035442?v=4","gravatar_id":"","url":"https://api.github.com/users/prateekiiest","html_url":"https://github.com/prateekiiest","followers_url":"https://api.github.com/users/prateekiiest/followers","following_url":"https://api.github.com/users/prateekiiest/following{/other_user}","gists_url":"https://api.github.com/users/prateekiiest/gists{/gist_id}","starred_url":"https://api.github.com/users/prateekiiest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateekiiest/subscriptions","organizations_url":"https://api.github.com/users/prateekiiest/orgs","repos_url":"https://api.github.com/users/prateekiiest/repos","events_url":"https://api.github.com/users/prateekiiest/events{/privacy}","received_events_url":"https://api.github.com/users/prateekiiest/received_events","type":"User","site_admin":false},"body":"Original issue #2288 \r\nPR #2306 ","created_at":"2018-03-28T12:02:53Z","updated_at":"2018-03-30T18:24:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7ff62d3d08a7de683ce875fb328d8664be64f02","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sunpy/sunpy/pulls/2566/commits","review_comments_url":"https://api.github.com/repos/sunpy/sunpy/pulls/2566/comments","review_comment_url":"https://api.github.com/repos/sunpy/sunpy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sunpy/sunpy/issues/2566/comments","statuses_url":"https://api.github.com/repos/sunpy/sunpy/statuses/bc6ae7e1e9df5b69a50181b8a2dd5ea0005a2491","head":{"label":"prateekiiest:patch-3","ref":"patch-3","sha":"bc6ae7e1e9df5b69a50181b8a2dd5ea0005a2491","user":{"login":"prateekiiest","id":16035442,"avatar_url":"https://avatars0.githubusercontent.com/u/16035442?v=4","gravatar_id":"","url":"https://api.github.com/users/prateekiiest","html_url":"https://github.com/prateekiiest","followers_url":"https://api.github.com/users/prateekiiest/followers","following_url":"https://api.github.com/users/prateekiiest/following{/other_user}","gists_url":"https://api.github.com/users/prateekiiest/gists{/gist_id}","starred_url":"https://api.github.com/users/prateekiiest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateekiiest/subscriptions","organizations_url":"https://api.github.com/users/prateekiiest/orgs","repos_url":"https://api.github.com/users/prateekiiest/repos","events_url":"https://api.github.com/users/prateekiiest/events{/privacy}","received_events_url":"https://api.github.com/users/prateekiiest/received_events","type":"User","site_admin":false},"repo":{"id":79814523,"name":"sunpy","full_name":"prateekiiest/sunpy","owner":{"login":"prateekiiest","id":16035442,"avatar_url":"https://avatars0.githubusercontent.com/u/16035442?v=4","gravatar_id":"","url":"https://api.github.com/users/prateekiiest","html_url":"https://github.com/prateekiiest","followers_url":"https://api.github.com/users/prateekiiest/followers","following_url":"https://api.github.com/users/prateekiiest/following{/other_user}","gists_url":"https://api.github.com/users/prateekiiest/gists{/gist_id}","starred_url":"https://api.github.com/users/prateekiiest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateekiiest/subscriptions","organizations_url":"https://api.github.com/users/prateekiiest/orgs","repos_url":"https://api.github.com/users/prateekiiest/repos","events_url":"https://api.github.com/users/prateekiiest/events{/privacy}","received_events_url":"https://api.github.com/users/prateekiiest/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prateekiiest/sunpy","description":"Contributing to SunPy - Python for Solar Physics :sun_with_face: :octocat:","fork":true,"url":"https://api.github.com/repos/prateekiiest/sunpy","forks_url":"https://api.github.com/repos/prateekiiest/sunpy/forks","keys_url":"https://api.github.com/repos/prateekiiest/sunpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prateekiiest/sunpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prateekiiest/sunpy/teams","hooks_url":"https://api.github.com/repos/prateekiiest/sunpy/hooks","issue_events_url":"https://api.github.com/repos/prateekiiest/sunpy/issues/events{/number}","events_url":"https://api.github.com/repos/prateekiiest/sunpy/events","assignees_url":"https://api.github.com/repos/prateekiiest/sunpy/assignees{/user}","branches_url":"https://api.github.com/repos/prateekiiest/sunpy/branches{/branch}","tags_url":"https://api.github.com/repos/prateekiiest/sunpy/tags","blobs_url":"https://api.github.com/repos/prateekiiest/sunpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prateekiiest/sunpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prateekiiest/sunpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/prateekiiest/sunpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prateekiiest/sunpy/statuses/{sha}","languages_url":"https://api.github.com/repos/prateekiiest/sunpy/languages","stargazers_url":"https://api.github.com/repos/prateekiiest/sunpy/stargazers","contributors_url":"https://api.github.com/repos/prateekiiest/sunpy/contributors","subscribers_url":"https://api.github.com/repos/prateekiiest/sunpy/subscribers","subscription_url":"https://api.github.com/repos/prateekiiest/sunpy/subscription","commits_url":"https://api.github.com/repos/prateekiiest/sunpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/prateekiiest/sunpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/prateekiiest/sunpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/prateekiiest/sunpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/prateekiiest/sunpy/contents/{+path}","compare_url":"https://api.github.com/repos/prateekiiest/sunpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prateekiiest/sunpy/merges","archive_url":"https://api.github.com/repos/prateekiiest/sunpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prateekiiest/sunpy/downloads","issues_url":"https://api.github.com/repos/prateekiiest/sunpy/issues{/number}","pulls_url":"https://api.github.com/repos/prateekiiest/sunpy/pulls{/number}","milestones_url":"https://api.github.com/repos/prateekiiest/sunpy/milestones{/number}","notifications_url":"https://api.github.com/repos/prateekiiest/sunpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prateekiiest/sunpy/labels{/name}","releases_url":"https://api.github.com/repos/prateekiiest/sunpy/releases{/id}","deployments_url":"https://api.github.com/repos/prateekiiest/sunpy/deployments","created_at":"2017-01-23T14:59:09Z","updated_at":"2017-10-21T11:09:52Z","pushed_at":"2018-03-30T12:09:09Z","git_url":"git://github.com/prateekiiest/sunpy.git","ssh_url":"git@github.com:prateekiiest/sunpy.git","clone_url":"https://github.com/prateekiiest/sunpy.git","svn_url":"https://github.com/prateekiiest/sunpy","homepage":"http://www.sunpy.org","size":41399,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sunpy:master","ref":"master","sha":"48ab0bda572b06cd488649abe77b0ac03bf3c5c3","user":{"login":"sunpy","id":963197,"avatar_url":"https://avatars0.githubusercontent.com/u/963197?v=4","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://avatars0.githubusercontent.com/u/963197?v=4","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}","deployments_url":"https://api.github.com/repos/sunpy/sunpy/deployments","created_at":"2011-08-06T15:34:08Z","updated_at":"2018-03-27T08:54:14Z","pushed_at":"2018-03-30T12:09:11Z","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":41546,"stargazers_count":325,"watchers_count":325,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":258,"mirror_url":null,"archived":false,"open_issues_count":211,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":258,"open_issues":211,"watchers":325,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/2566"},"html":{"href":"https://github.com/sunpy/sunpy/pull/2566"},"issue":{"href":"https://api.github.com/repos/sunpy/sunpy/issues/2566"},"comments":{"href":"https://api.github.com/repos/sunpy/sunpy/issues/2566/comments"},"review_comments":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/2566/comments"},"review_comment":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/2566/commits"},"statuses":{"href":"https://api.github.com/repos/sunpy/sunpy/statuses/bc6ae7e1e9df5b69a50181b8a2dd5ea0005a2491"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"prateekiiest"}}