Writing a web GUI for gnuplot

This final recipe will teach you how to make your own interactive web application that uses gnuplot to draw a graph in response to user input. It is not a general-purpose GUI for gnuplot as was the subject of the previous recipe, but rather shows one way to use gnuplot as part of a special-purpose web application. Because gnuplot can be controlled through text commands and can create PNG files, which are size-efficient and well supported by current web browsers, it is very well suited to this type of project.

We are going to create a simple game that asks the user to hit a target with a cannonball. The player enters two numbers, the initial speed of the projectile and the angle of the cannon. After clicking on a button ...

Get gnuplot Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.