Gnuplot canvas terminal

HTML 5 canvas element

This extension to the HTML standard allows a web page to embed or link to scripting code that draws simple graphics onto part of the page. In essence the browser runs a program, typically javascript, that draws the picture on demand. The actions of this drawing program can be changed interactively by other elements on the same web page. This is different from displaying a picture that was drawn elsewhere and then downloaded as, say, a PNG image. It is also different from running an embedded application such as Flash or Java that takes over part of the display window but interacts minimally with other elements on the web page. The closest equivalent is a web page containing an embedded block of SVG graphics.
References:

The gnuplot canvas terminal

The gnuplot canvas terminal creates a block of javascript code that can draw a picture on a web page. By default it also creates a minimal web page (HTML document) and embeds the javascript in that same file. Alternatively you can specify the name of a drawing function, and the driver will create a file containing only a javascript function by that name. You can create your own web page refering to one or more of these named functions as external resources.
Examples:

Mouse interaction

Gnuplot also provides a prototype set of javascript routines to perform interactive mousing of plots generated by the canvas terminal driver. The keyword "mouse" automatically includes a reference to this set of scripts in the output HTML document. Plots created as separate javascript files are also mouseable, but you would have to adapt the mousing script to coordinate interactions with separate, named plots. The index page of the demo set is an example of this.
Mouse movement
Track mouse coordinates
Left-button click
Echo and save current mouse coordinates
#
Toggle grid lines (only works if the plot was created with grid lines!)
unzoom
Unzoom (restores original plot)
rezoom
Rezoom
Browser support for zooming
Firefox - Click and drag with right mouse button
Opera - Mouse buttons are problematic. To zoom you must set the middle-button mode to "Gestures". Click and release the middle button once to select one corner of the zoom box; then click a second time in the same place and drag to define the other corner.
Safari - Untested
IE - Untested