{"action":"created","comment":{"url":"https://api.github.com/repos/taborlab/FlowCal/pulls/comments/67202620","id":67202620,"diff_hunk":"@@ -1058,21 +1141,33 @@ def scatter2d(data_list,\n         plt.ylabel(data_plot.channels[1])\n \n     # Set scale of axes\n-    plt.gca().set_xscale(xscale)\n-    plt.gca().set_yscale(yscale)\n+    plt.gca().set_xscale(xscale, data=data_list, channel=channels[0])\n+    plt.gca().set_yscale(yscale, data=data_list, channel=channels[1])\n \n-    # Set plot limits if specified, else extract range from data_plot\n+    # Set plot limits if specified, else extract range from data_list\n     # Use data_plot.hist_bins with one single bin\n-    if xlim is not None:\n-        plt.xlim(xlim)\n-    elif hasattr(data_plot, 'hist_bins') and \\\n-            hasattr(data_plot.hist_bins, '__call__'):\n-        plt.xlim(data_plot.hist_bins(channels=0, nbins=1, scale=xscale))\n-    if ylim is not None:\n-        plt.ylim(ylim)\n-    elif hasattr(data_plot, 'hist_bins') and \\\n-            hasattr(data_plot.hist_bins, '__call__'):\n-        plt.ylim(data_plot.hist_bins(channels=1, nbins=1, scale=yscale))\n+    if xlim is None:\n+        xlim = [np.inf, -np.inf]\n+        for data in data_list:\n+            if hasattr(data, 'hist_bins') and \\\n+                    hasattr(data.hist_bins, '__call__'):\n+                xlim_data = data.hist_bins(channels=channels[0],\n+                                           nbins=1,\n+                                           scale=xscale)","path":"FlowCal/plot.py","position":633,"original_position":282,"commit_id":"7ca014e1a88b385cd26b876acb6070a790fa32db","original_commit_id":"42983cee092bae729f265239dc671cee0ab3f631","user":{"login":"castillohair","id":1529481,"avatar_url":"https://avatars.githubusercontent.com/u/1529481?v=3","gravatar_id":"","url":"https://api.github.com/users/castillohair","html_url":"https://github.com/castillohair","followers_url":"https://api.github.com/users/castillohair/followers","following_url":"https://api.github.com/users/castillohair/following{/other_user}","gists_url":"https://api.github.com/users/castillohair/gists{/gist_id}","starred_url":"https://api.github.com/users/castillohair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/castillohair/subscriptions","organizations_url":"https://api.github.com/users/castillohair/orgs","repos_url":"https://api.github.com/users/castillohair/repos","events_url":"https://api.github.com/users/castillohair/events{/privacy}","received_events_url":"https://api.github.com/users/castillohair/received_events","type":"User","site_admin":false},"body":"`hist_bins` automatically handles the case in which `log` scaling is requested, but the lower limit of `range` is zero (you can't log zero).\r\n\r\nAnother way to handle this would be to get the range, explicitly check if the lower value is zero, and take appropriate action. But this happened frequently enough that I though using `hist_bins`  in all these instances was a better option.","created_at":"2016-06-15T17:04:07Z","updated_at":"2016-06-15T17:04:07Z","html_url":"https://github.com/taborlab/FlowCal/pull/213#discussion_r67202620","pull_request_url":"https://api.github.com/repos/taborlab/FlowCal/pulls/213","_links":{"self":{"href":"https://api.github.com/repos/taborlab/FlowCal/pulls/comments/67202620"},"html":{"href":"https://github.com/taborlab/FlowCal/pull/213#discussion_r67202620"},"pull_request":{"href":"https://api.github.com/repos/taborlab/FlowCal/pulls/213"}}},"pull_request":{"url":"https://api.github.com/repos/taborlab/FlowCal/pulls/213","id":72290360,"html_url":"https://github.com/taborlab/FlowCal/pull/213","diff_url":"https://github.com/taborlab/FlowCal/pull/213.diff","patch_url":"https://github.com/taborlab/FlowCal/pull/213.patch","issue_url":"https://api.github.com/repos/taborlab/FlowCal/issues/213","number":213,"state":"open","locked":false,"title":"MEFing for floating-point data","user":{"login":"castillohair","id":1529481,"avatar_url":"https://avatars.githubusercontent.com/u/1529481?v=3","gravatar_id":"","url":"https://api.github.com/users/castillohair","html_url":"https://github.com/castillohair","followers_url":"https://api.github.com/users/castillohair/followers","following_url":"https://api.github.com/users/castillohair/following{/other_user}","gists_url":"https://api.github.com/users/castillohair/gists{/gist_id}","starred_url":"https://api.github.com/users/castillohair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/castillohair/subscriptions","organizations_url":"https://api.github.com/users/castillohair/orgs","repos_url":"https://api.github.com/users/castillohair/repos","events_url":"https://api.github.com/users/castillohair/events{/privacy}","received_events_url":"https://api.github.com/users/castillohair/received_events","type":"User","site_admin":false},"body":"Solves #195.\r\n\r\n- MEFing of data acquired with linear amplification is supported, both with the Excel UI and Python API. Changes required to support this include new or modified functions in `FlowCal.mef`, a new standard curve model, and the fact that all data should now be transformed manually to a.u. before MEF.\r\n- Floating-point data with negative values is correctly processed. In particular, logicle scale has been implemented for visualization, and it is the default (Excel UI) for data acquired with linear amplification. Geometric statistics are calculated on the positive events, and a warning is thrown indicating the percentage of valid events.\r\n- Tested with examples and private dataset aquired using the SEA's flow cytometer. The latter exports FCS files version 2.0 (integer) with either linear or log amplification, and FCS3.0 (floating-point, negative values) with linear amplification (log amplification with floating point is not allowed by the standard). MEFing with the Excel UI seems to be performed correctly, as far as I can tell, with these three datasets.","created_at":"2016-06-02T05:15:11Z","updated_at":"2016-06-15T17:04:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5bd4e880e523ff4c6484a9eba31919bffd4c0409","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/taborlab/FlowCal/pulls/213/commits","review_comments_url":"https://api.github.com/repos/taborlab/FlowCal/pulls/213/comments","review_comment_url":"https://api.github.com/repos/taborlab/FlowCal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taborlab/FlowCal/issues/213/comments","statuses_url":"https://api.github.com/repos/taborlab/FlowCal/statuses/7ca014e1a88b385cd26b876acb6070a790fa32db","head":{"label":"taborlab:floating-mef","ref":"floating-mef","sha":"7ca014e1a88b385cd26b876acb6070a790fa32db","user":{"login":"taborlab","id":6797549,"avatar_url":"https://avatars.githubusercontent.com/u/6797549?v=3","gravatar_id":"","url":"https://api.github.com/users/taborlab","html_url":"https://github.com/taborlab","followers_url":"https://api.github.com/users/taborlab/followers","following_url":"https://api.github.com/users/taborlab/following{/other_user}","gists_url":"https://api.github.com/users/taborlab/gists{/gist_id}","starred_url":"https://api.github.com/users/taborlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taborlab/subscriptions","organizations_url":"https://api.github.com/users/taborlab/orgs","repos_url":"https://api.github.com/users/taborlab/repos","events_url":"https://api.github.com/users/taborlab/events{/privacy}","received_events_url":"https://api.github.com/users/taborlab/received_events","type":"Organization","site_admin":false},"repo":{"id":38354829,"name":"FlowCal","full_name":"taborlab/FlowCal","owner":{"login":"taborlab","id":6797549,"avatar_url":"https://avatars.githubusercontent.com/u/6797549?v=3","gravatar_id":"","url":"https://api.github.com/users/taborlab","html_url":"https://github.com/taborlab","followers_url":"https://api.github.com/users/taborlab/followers","following_url":"https://api.github.com/users/taborlab/following{/other_user}","gists_url":"https://api.github.com/users/taborlab/gists{/gist_id}","starred_url":"https://api.github.com/users/taborlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taborlab/subscriptions","organizations_url":"https://api.github.com/users/taborlab/orgs","repos_url":"https://api.github.com/users/taborlab/repos","events_url":"https://api.github.com/users/taborlab/events{/privacy}","received_events_url":"https://api.github.com/users/taborlab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taborlab/FlowCal","description":"Python Flow Cytometry Calibration Library","fork":false,"url":"https://api.github.com/repos/taborlab/FlowCal","forks_url":"https://api.github.com/repos/taborlab/FlowCal/forks","keys_url":"https://api.github.com/repos/taborlab/FlowCal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taborlab/FlowCal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taborlab/FlowCal/teams","hooks_url":"https://api.github.com/repos/taborlab/FlowCal/hooks","issue_events_url":"https://api.github.com/repos/taborlab/FlowCal/issues/events{/number}","events_url":"https://api.github.com/repos/taborlab/FlowCal/events","assignees_url":"https://api.github.com/repos/taborlab/FlowCal/assignees{/user}","branches_url":"https://api.github.com/repos/taborlab/FlowCal/branches{/branch}","tags_url":"https://api.github.com/repos/taborlab/FlowCal/tags","blobs_url":"https://api.github.com/repos/taborlab/FlowCal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taborlab/FlowCal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taborlab/FlowCal/git/refs{/sha}","trees_url":"https://api.github.com/repos/taborlab/FlowCal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taborlab/FlowCal/statuses/{sha}","languages_url":"https://api.github.com/repos/taborlab/FlowCal/languages","stargazers_url":"https://api.github.com/repos/taborlab/FlowCal/stargazers","contributors_url":"https://api.github.com/repos/taborlab/FlowCal/contributors","subscribers_url":"https://api.github.com/repos/taborlab/FlowCal/subscribers","subscription_url":"https://api.github.com/repos/taborlab/FlowCal/subscription","commits_url":"https://api.github.com/repos/taborlab/FlowCal/commits{/sha}","git_commits_url":"https://api.github.com/repos/taborlab/FlowCal/git/commits{/sha}","comments_url":"https://api.github.com/repos/taborlab/FlowCal/comments{/number}","issue_comment_url":"https://api.github.com/repos/taborlab/FlowCal/issues/comments{/number}","contents_url":"https://api.github.com/repos/taborlab/FlowCal/contents/{+path}","compare_url":"https://api.github.com/repos/taborlab/FlowCal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taborlab/FlowCal/merges","archive_url":"https://api.github.com/repos/taborlab/FlowCal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taborlab/FlowCal/downloads","issues_url":"https://api.github.com/repos/taborlab/FlowCal/issues{/number}","pulls_url":"https://api.github.com/repos/taborlab/FlowCal/pulls{/number}","milestones_url":"https://api.github.com/repos/taborlab/FlowCal/milestones{/number}","notifications_url":"https://api.github.com/repos/taborlab/FlowCal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taborlab/FlowCal/labels{/name}","releases_url":"https://api.github.com/repos/taborlab/FlowCal/releases{/id}","deployments_url":"https://api.github.com/repos/taborlab/FlowCal/deployments","created_at":"2015-07-01T06:50:32Z","updated_at":"2016-04-28T17:10:30Z","pushed_at":"2016-06-15T16:39:41Z","git_url":"git://github.com/taborlab/FlowCal.git","ssh_url":"git@github.com:taborlab/FlowCal.git","clone_url":"https://github.com/taborlab/FlowCal.git","svn_url":"https://github.com/taborlab/FlowCal","homepage":"","size":10088,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":24,"forks":1,"open_issues":24,"watchers":4,"default_branch":"master"}},"base":{"label":"taborlab:develop","ref":"develop","sha":"9aaaba5a97e796278d663afd00c00d62ef05e7f6","user":{"login":"taborlab","id":6797549,"avatar_url":"https://avatars.githubusercontent.com/u/6797549?v=3","gravatar_id":"","url":"https://api.github.com/users/taborlab","html_url":"https://github.com/taborlab","followers_url":"https://api.github.com/users/taborlab/followers","following_url":"https://api.github.com/users/taborlab/following{/other_user}","gists_url":"https://api.github.com/users/taborlab/gists{/gist_id}","starred_url":"https://api.github.com/users/taborlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taborlab/subscriptions","organizations_url":"https://api.github.com/users/taborlab/orgs","repos_url":"https://api.github.com/users/taborlab/repos","events_url":"https://api.github.com/users/taborlab/events{/privacy}","received_events_url":"https://api.github.com/users/taborlab/received_events","type":"Organization","site_admin":false},"repo":{"id":38354829,"name":"FlowCal","full_name":"taborlab/FlowCal","owner":{"login":"taborlab","id":6797549,"avatar_url":"https://avatars.githubusercontent.com/u/6797549?v=3","gravatar_id":"","url":"https://api.github.com/users/taborlab","html_url":"https://github.com/taborlab","followers_url":"https://api.github.com/users/taborlab/followers","following_url":"https://api.github.com/users/taborlab/following{/other_user}","gists_url":"https://api.github.com/users/taborlab/gists{/gist_id}","starred_url":"https://api.github.com/users/taborlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taborlab/subscriptions","organizations_url":"https://api.github.com/users/taborlab/orgs","repos_url":"https://api.github.com/users/taborlab/repos","events_url":"https://api.github.com/users/taborlab/events{/privacy}","received_events_url":"https://api.github.com/users/taborlab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taborlab/FlowCal","description":"Python Flow Cytometry Calibration Library","fork":false,"url":"https://api.github.com/repos/taborlab/FlowCal","forks_url":"https://api.github.com/repos/taborlab/FlowCal/forks","keys_url":"https://api.github.com/repos/taborlab/FlowCal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taborlab/FlowCal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taborlab/FlowCal/teams","hooks_url":"https://api.github.com/repos/taborlab/FlowCal/hooks","issue_events_url":"https://api.github.com/repos/taborlab/FlowCal/issues/events{/number}","events_url":"https://api.github.com/repos/taborlab/FlowCal/events","assignees_url":"https://api.github.com/repos/taborlab/FlowCal/assignees{/user}","branches_url":"https://api.github.com/repos/taborlab/FlowCal/branches{/branch}","tags_url":"https://api.github.com/repos/taborlab/FlowCal/tags","blobs_url":"https://api.github.com/repos/taborlab/FlowCal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taborlab/FlowCal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taborlab/FlowCal/git/refs{/sha}","trees_url":"https://api.github.com/repos/taborlab/FlowCal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taborlab/FlowCal/statuses/{sha}","languages_url":"https://api.github.com/repos/taborlab/FlowCal/languages","stargazers_url":"https://api.github.com/repos/taborlab/FlowCal/stargazers","contributors_url":"https://api.github.com/repos/taborlab/FlowCal/contributors","subscribers_url":"https://api.github.com/repos/taborlab/FlowCal/subscribers","subscription_url":"https://api.github.com/repos/taborlab/FlowCal/subscription","commits_url":"https://api.github.com/repos/taborlab/FlowCal/commits{/sha}","git_commits_url":"https://api.github.com/repos/taborlab/FlowCal/git/commits{/sha}","comments_url":"https://api.github.com/repos/taborlab/FlowCal/comments{/number}","issue_comment_url":"https://api.github.com/repos/taborlab/FlowCal/issues/comments{/number}","contents_url":"https://api.github.com/repos/taborlab/FlowCal/contents/{+path}","compare_url":"https://api.github.com/repos/taborlab/FlowCal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taborlab/FlowCal/merges","archive_url":"https://api.github.com/repos/taborlab/FlowCal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taborlab/FlowCal/downloads","issues_url":"https://api.github.com/repos/taborlab/FlowCal/issues{/number}","pulls_url":"https://api.github.com/repos/taborlab/FlowCal/pulls{/number}","milestones_url":"https://api.github.com/repos/taborlab/FlowCal/milestones{/number}","notifications_url":"https://api.github.com/repos/taborlab/FlowCal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taborlab/FlowCal/labels{/name}","releases_url":"https://api.github.com/repos/taborlab/FlowCal/releases{/id}","deployments_url":"https://api.github.com/repos/taborlab/FlowCal/deployments","created_at":"2015-07-01T06:50:32Z","updated_at":"2016-04-28T17:10:30Z","pushed_at":"2016-06-15T16:39:41Z","git_url":"git://github.com/taborlab/FlowCal.git","ssh_url":"git@github.com:taborlab/FlowCal.git","clone_url":"https://github.com/taborlab/FlowCal.git","svn_url":"https://github.com/taborlab/FlowCal","homepage":"","size":10088,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":24,"forks":1,"open_issues":24,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/taborlab/FlowCal/pulls/213"},"html":{"href":"https://github.com/taborlab/FlowCal/pull/213"},"issue":{"href":"https://api.github.com/repos/taborlab/FlowCal/issues/213"},"comments":{"href":"https://api.github.com/repos/taborlab/FlowCal/issues/213/comments"},"review_comments":{"href":"https://api.github.com/repos/taborlab/FlowCal/pulls/213/comments"},"review_comment":{"href":"https://api.github.com/repos/taborlab/FlowCal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taborlab/FlowCal/pulls/213/commits"},"statuses":{"href":"https://api.github.com/repos/taborlab/FlowCal/statuses/7ca014e1a88b385cd26b876acb6070a790fa32db"}}}}
{"actor":{"display_login":"castillohair"}}