{"action":"created","issue":{"url":"https://api.github.com/repos/lmfit/lmfit-py/issues/457","repository_url":"https://api.github.com/repos/lmfit/lmfit-py","labels_url":"https://api.github.com/repos/lmfit/lmfit-py/issues/457/labels{/name}","comments_url":"https://api.github.com/repos/lmfit/lmfit-py/issues/457/comments","events_url":"https://api.github.com/repos/lmfit/lmfit-py/issues/457/events","html_url":"https://github.com/lmfit/lmfit-py/issues/457","id":304577919,"number":457,"title":"Residual plot is inverted","user":{"login":"abonawas","id":22199315,"avatar_url":"https://avatars0.githubusercontent.com/u/22199315?v=4","gravatar_id":"","url":"https://api.github.com/users/abonawas","html_url":"https://github.com/abonawas","followers_url":"https://api.github.com/users/abonawas/followers","following_url":"https://api.github.com/users/abonawas/following{/other_user}","gists_url":"https://api.github.com/users/abonawas/gists{/gist_id}","starred_url":"https://api.github.com/users/abonawas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonawas/subscriptions","organizations_url":"https://api.github.com/users/abonawas/orgs","repos_url":"https://api.github.com/users/abonawas/repos","events_url":"https://api.github.com/users/abonawas/events{/privacy}","received_events_url":"https://api.github.com/users/abonawas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-12T23:34:49Z","updated_at":"2018-03-12T23:46:50Z","closed_at":"2018-03-12T23:46:50Z","author_association":"NONE","body":"Example:\r\n```\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom lmfit import Model\r\n\r\nf = lambda x: x - x +12\r\nx = np.arange(-5, 5)\r\ny = x**2\r\n\r\nlinear_model = Model(f)\r\nparams = linear_model.make_params()\r\nresult = linear_model.fit(y, x=x)\r\n\r\nresult.plot()\r\nplt.show()\r\n```\r\n\r\nI checked the Model class, the method plot_residuals should return:\r\n`ax.plot(x_array, self.data - self.eval() , datafmt,\r\n                    label='residuals', **data_kws)`\r\nInstead of:\r\n`ax.plot(x_array, self.data - self.eval() , datafmt,\r\n                    label='residuals', **data_kws)`\r\n\r\nThank you,\r\nAbonawas.\r\n"},"comment":{"url":"https://api.github.com/repos/lmfit/lmfit-py/issues/comments/372499360","html_url":"https://github.com/lmfit/lmfit-py/issues/457#issuecomment-372499360","issue_url":"https://api.github.com/repos/lmfit/lmfit-py/issues/457","id":372499360,"user":{"login":"newville","id":304251,"avatar_url":"https://avatars0.githubusercontent.com/u/304251?v=4","gravatar_id":"","url":"https://api.github.com/users/newville","html_url":"https://github.com/newville","followers_url":"https://api.github.com/users/newville/followers","following_url":"https://api.github.com/users/newville/following{/other_user}","gists_url":"https://api.github.com/users/newville/gists{/gist_id}","starred_url":"https://api.github.com/users/newville/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newville/subscriptions","organizations_url":"https://api.github.com/users/newville/orgs","repos_url":"https://api.github.com/users/newville/repos","events_url":"https://api.github.com/users/newville/events{/privacy}","received_events_url":"https://api.github.com/users/newville/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T23:46:50Z","updated_at":"2018-03-12T23:46:50Z","author_association":"OWNER","body":"@abonawas We absolutely assert that you have read and understood Contributing.md before raising an Issue.  And yet you still decided (deliberately and incorrectly) to raise an Issue instead of asking a question.  In fact, the `plot_residuals()` method does\r\n\r\n   ax.plot(x_array, self.eval() - self.data, datafmt,  label='residuals', **data_kws)\r\n\r\nso your Issue is Just Plain Wrong.     \r\n\r\nAre you trying to assert that \"fit-data\" is wrong and it should be \"data-fit\"?  Who knows? \r\n\r\nUse the mailing list for questions, as clearly instructed when creating an Issue."}}
{"actor":{"display_login":"newville"}}