tag:blogger.com,1999:blog-1693014329567144872.post5086640360397152815..comments2023-08-27T06:49:20.658+01:00Comments on The Glowing Python: Visualizing the tangentJustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-1693014329567144872.post-10130431417652205432021-11-22T07:44:33.365+00:002021-11-22T07:44:33.365+00:00hi there, the second example in this post shows ex...hi there, the second example in this post shows exactly that.JustGlowinghttps://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-41732047854817931062021-11-22T05:17:00.612+00:002021-11-22T05:17:00.612+00:00hi! I was wondering if it's possible to draw a...hi! I was wondering if it's possible to draw a tangent line on a given graph? So basically is there a way to plot a tangent line without knowing the function of the original graph?Anonymoushttps://www.blogger.com/profile/00418129150790631425noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-38324367509394041902020-05-12T07:34:57.687+01:002020-05-12T07:34:57.687+01:00Hi there, all your comments are approved. I might ...Hi there, all your comments are approved. I might try to do your experiment, but don't expect much as I'm super busy lately.JustGlowinghttps://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-90286012095769500152020-05-12T02:37:11.301+01:002020-05-12T02:37:11.301+01:00Hi JustGlowing, I can see that my last message has...Hi JustGlowing, I can see that my last message has not been approved. Basically I wanted just a simple change in your tangent example: draw the tangent in semilogy coordinates. I am doing it OK, but my impression is that the tangent is a little curved. I was curios to see how you do it and if your tangent would be a perfectly straight line.Bogdanhttps://www.blogger.com/profile/15012843151244461477noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-86209143916868917742020-05-01T23:25:31.075+01:002020-05-01T23:25:31.075+01:00I am just trying to do something similar to yours ...I am just trying to do something similar to yours but in semilogY coordinates. If you try your example in such coordinates you will understand the problem. It is an easy change in your code. It is not a scaling problem is a problem of calculating the slope in such coordinates if your original graph is already in semilogY coordinates and I cannot change that order.Bogdanhttps://www.blogger.com/profile/15012843151244461477noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-20514849439759097772020-05-01T07:55:22.895+01:002020-05-01T07:55:22.895+01:00hi again Bogdan, I'm afraid that I can't t...hi again Bogdan, I'm afraid that I can't try that at the moment. However, if you have an overflow problem, you can try scaling your data linearly first then apply the 10^. Of course, you'll have to fix the ticks on the axis then.<br /><br />In any case, I'm not sure that what you are trying to do is sound. A line in a linear scale is not a line in semilog. A modified curve to look like a line will not highlight the trend.JustGlowinghttps://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-29147485922489546352020-04-30T20:12:59.169+01:002020-04-30T20:12:59.169+01:00Thanks, unfortunately my case is not that simple. ...Thanks, unfortunately my case is not that simple. I know how to do it when Y is log and you have just that line. However, let use your example where your have your example with function being interpolated and get the tangent. I used the simple line not the 10^ and draws pretty good but it is slightly curved. with 10^ it gives overflow. Could your try your example with semilogY and draw the tangent in such conditions. Basically I have the discrete function already drawn and I want to draw a tangent in one point.Bogdanhttps://www.blogger.com/profile/15012843151244461477noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-91861757345976131862020-04-30T17:18:42.012+01:002020-04-30T17:18:42.012+01:00hi bogdan, you have to workout the equation of the...hi bogdan, you have to workout the equation of the tangent differently. This can help: https://www.graphpad.com/guides/prism/7/curve-fitting/reg_fitting_lines_to_semilog.htmJustGlowinghttps://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-34673109521710415412020-04-30T16:57:37.837+01:002020-04-30T16:57:37.837+01:00Very nice. I have a question:
* How would you dr...Very nice. I have a question:<br /><br />* How would you draw a straight line tangent in semilog coordinates? Bogdanhttps://www.blogger.com/profile/15012843151244461477noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-16567268696091360422015-01-08T11:24:30.758+00:002015-01-08T11:24:30.758+00:00yes, fprime is the slope of the tangent.yes, fprime is the slope of the tangent.JustGlowinghttps://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-65218034775032138792015-01-07T11:32:02.873+00:002015-01-07T11:32:02.873+00:00Thank you for the quick reply what I wanted to ask...Thank you for the quick reply what I wanted to ask is can fprime be taken as the gradient of the tangent?Anonymoushttps://www.blogger.com/profile/17611174877053675967noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-11924747722279934332015-01-07T08:48:05.242+00:002015-01-07T08:48:05.242+00:00Hi Abu, the gradient of the tangent is a scalar va...Hi Abu, the gradient of the tangent is a scalar value which represents its slope. Just plotting the tangent should give a good idea of it's slope.JustGlowinghttps://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-57487135375015446482015-01-06T23:08:33.431+00:002015-01-06T23:08:33.431+00:00Hi was wondering if there is a way of getting the ...Hi was wondering if there is a way of getting the gradient of the tangent once the tangent has been plottedAnonymoushttps://www.blogger.com/profile/17611174877053675967noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-40023776108187009512015-01-06T23:06:06.731+00:002015-01-06T23:06:06.731+00:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/17611174877053675967noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-64681202170121779822013-04-29T07:32:31.250+01:002013-04-29T07:32:31.250+01:00Thanks James, it looks so nice.Thanks James, it looks so nice.JustGlowinghttps://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-13325267817925466652013-04-29T05:06:13.814+01:002013-04-29T05:06:13.814+01:00Here's the same graph made with plotly's P...Here's the same graph made with plotly's Python sandbox: https://plot.ly/~jackp/506<br /><br />More examples of graphs made with Python in plotly: https://plot.ly/galleryAnonymoushttps://www.blogger.com/profile/11664251055714537664noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-80918628202565457792013-04-29T04:58:55.672+01:002013-04-29T04:58:55.672+01:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/11664251055714537664noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-60477431901248574272013-04-17T10:23:41.647+01:002013-04-17T10:23:41.647+01:00The code presented here in pypedia:
* http://bit.l...The code presented here in <a href="http://www.pypedia.com" rel="nofollow">pypedia</a>:<br />* <a href="http://bit.ly/ZqgFgy" rel="nofollow">http://bit.ly/ZqgFgy</a><br />* <a href="http://bit.ly/10eRS24" rel="nofollow">http://bit.ly/10eRS24</a><br /><br />press "Run"Alexandros Kanterakishttps://www.blogger.com/profile/04138138055671062045noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-40829874102317018832013-02-19T09:24:36.030+00:002013-02-19T09:24:36.030+00:00yup!yup!JustGlowinghttps://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-39128404045384148872013-02-19T05:06:20.323+00:002013-02-19T05:06:20.323+00:00Should interpolate.splrep(t,price_index) be interp...Should interpolate.splrep(t,price_index) be interpolate.splrep(t,y)?Anonymousnoreply@blogger.com