Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Script-Tutorials.com: Creating a Smooth Curve Graphs with PHP and GD

Script-Tutorials.com: Creating a Smooth Curve Graphs with PHP and GD

On Script-Tutorials.com there’s a new tutorial posted showing you how you can get better curves on your graphs with PHP and GD (the key is in the “CubicSplines” class, providing a few extra calculations to make “splines”, a mathematical method for smoothing out values).

Today I have new article for PHP. I will tell you about drawing graphs with GD. Plus – we will smooth our graph with curve lines using cubic splines interpolation method. You can read more about method at Wikipedia.

All of the code is included in the post, ready for cop and pasting – the HTML, CSS plus the PHP to generate the graph, plot the points and apply the cubic splines values. You can check out a live demo of it in action or just download the code and get started on your own.

Source: http://www.phpdeveloper.org/news/17038

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Posted Październik 27th, 2011 in WEB and PHP Development.

Leave a response: