curve

How to plot individual points without curve in python?

血红的双手。 提交于 2019-12-30 06:27:08
问题 I want to plot individual data points with error bars on a plot, but I don't want to have the curve. How can I do this? Are there some 'invisible' line style or can I set the line style colourless (but the marker still has to be visible)? So this is the graph I have right now: plt.errorbar(x5,y5,yerr=error5, fmt='o') plt.errorbar(x3,y3,yerr=error3, fmt='o') plt.plot(x3_true,y3_true, 'r--', label=(r'$\lambda = 0.3$')) plot(x5_true, y5_true, 'b--', label=(r'$\lambda = 0.5$')) plt.plot(x5,y5,

How do i smooth the curves(contours) in OpenCV?

痞子三分冷 提交于 2019-12-30 02:08:06
问题 I am working on a black&white image just like the first one from the link : http://imageshack.us/g/33/firstwm.png/ It has a lot of "noise" so I applied a Median filter over it to smooth it, thus getting the second picture. cvSmooth(TempImage, TempImage, CV_MEDIAN, 5, 0); After this i get the contours and draw them on another image like the 3rd picture from the link. My problem is that the contours are still a little pixelated(edgy). Is there a way to smooth the B&W image even more so to

In Scipy how and why does curve_fit calculate the covariance of the parameter estimates

筅森魡賤 提交于 2019-12-27 17:01:49
问题 I have been using scipy.optimize.leastsq to fit some data. I would like to get some confidence intervals on these estimates so I look into the cov_x output but the documentation is very unclear as to what this is and how to get the covariance matrix for my parameters from this. First of all it says that it is a Jacobian, but in the notes it also says that " cov_x is a Jacobian approximation to the Hessian" so that it is not actually a Jacobian but a Hessian using some approximation from the

In Scipy how and why does curve_fit calculate the covariance of the parameter estimates

て烟熏妆下的殇ゞ 提交于 2019-12-27 17:01:22
问题 I have been using scipy.optimize.leastsq to fit some data. I would like to get some confidence intervals on these estimates so I look into the cov_x output but the documentation is very unclear as to what this is and how to get the covariance matrix for my parameters from this. First of all it says that it is a Jacobian, but in the notes it also says that " cov_x is a Jacobian approximation to the Hessian" so that it is not actually a Jacobian but a Hessian using some approximation from the

How to plot a curved line in MATLAB using a set of points

半腔热情 提交于 2019-12-25 18:49:09
问题 I'm trying to draw ROC curves using an existing set of values using the following command plot(X1,Y1,'--rs',X2,Y2,'-*g'); Where X1 , Y1 , X2 and Y2 are matrices that have the same size However, the lines produced by this command are straight ones. How can I make them curved lines. Thanks Aziz 回答1: MATLAB by default uses straight line approximation to draw your graph in between control points. If you want, you can interpolate in between the points to produce a more realistic graph. Try using

Tunning gain table to match two-curves

余生颓废 提交于 2019-12-25 06:34:10
问题 I have two data set, let us name them "actual speed" and "desired speed". My main objective is to match actual speed with the desired speed. But for doing that in my case, I need to tune FF(1x10), Integral(10x8) and Proportional gain table(10x8). My approach till now was as follows:- First, start the iteration with having 0.1 as the initial value in the first cells(FF[0]) of the FF table Then find the R-square or Co-relation between two dataset( i.e. Actual Speed and Desired Speed) Increment

How to get t for average distance of Bézier curve

自作多情 提交于 2019-12-24 15:33:05
问题 I am calculating the interpolation position of Bézier curve by using the formula: pow(1 - t, 2) * start + 2.0 * (1 - t) * t * control + t * t * end The problem is that if I linear step the t by for example 0.1 per segment, the length of segment on the Bézier curve is not average. Is there any way to get the corresponding array of t for getting average or approximately average length of the segment on the curve. 回答1: It seems you want an approximate parametrization by arc length. For the

Need to draw projectile motion of a thrown ball

时间秒杀一切 提交于 2019-12-24 07:50:38
问题 So I'm writing a code that allows a user to throw an imaginary object at an initial angle and speed to see if they can come close to hitting a ball (that is positioned based on user input). However, I'm having trouble drawing the curve of the users inputted angle and speed of the imaginary object. I've used a mathematical formula to calculate the total time and range of said object. That is: 𝑟𝑎𝑛𝑔𝑒= 𝑣02sin⁡(2𝜃𝜋/180)𝑔 𝑡𝑜𝑡𝑎𝑙 𝑡𝑖𝑚𝑒= 2𝑣0sin⁡(𝜃𝜋/180)𝑔 I've already tried attempting to put range and

R ggplot2: how do I plot an implicit function (contour line at just one level)?

拜拜、爱过 提交于 2019-12-24 04:38:08
问题 Using R, I wanted to plot some datapoints and a curve over them (which is the decision boundary trained with neural network). First I did it with the normal plot functions, but now I want it to look more fancy using ggplot2 . This is what it looks like without ggplot (note the curve especially, the points are not too relevant): Plotting the points with ggplot is no problem, but now I want to add the curve as well, which is described by the following function: 1.91*(1/(1+exp(-(23.50+12.64*x-24

Contour/curve with orientation

孤人 提交于 2019-12-24 04:23:20
问题 How would I plot a curve (in 3d perhaps) with something to show the direction that it's going. For example, to show that a circular plane curve is going clockwise or counterclockwise. A curve like the one here, http://mathworld.wolfram.com/CauchyIntegralFormula.html I am not sure even if there is a comparable function right now, so I don't have an example to show you. Thanks for reading. Edit: I search quite a bit on this, don't think you can do this on gnuplot either. 回答1: Interesting