Generating graphs and maths in web pages using web services

Once again Tony Hirst’s [OUseful Info]( blog has led me to three new pieces of brilliant web technology. In his blog entry [RESTful Image generation – When Text Just Won’t Do](, Tony describes how MathTran (a Mathematics rendering service developed by the Open University) could be mashed up with with the Google Charts service to provide an easy way to get mathemattical results onto web pages. Lots of interesting stuff to follow up on but here are the highlights:
– Jonathan Fine’s blog entry on [MathTrans and Google Charts]( that inspired Tony’s speculations.

– The Mathematical text rendering system [MathTran]( which uses JavaScript to contact a web service that converts TeX embeded in the *src* attribute of an tag into PNG graphics file. E.g. ”tex: becomes ![tex: int_0^1 x^2 dx](;tex=%5Cint%20_0%5E1%20x%5E2%5C%2C%20dx).

– The [Google Charts API]( which takes a URL like×160&chd=s:DHNEDFD&chtt=Completed%20T175%20users%20stating%2038%20Current%20courses%20%28min%203%20users%29&chxt=y&chxr=0,0,10&chl=BM240%7CM150%7CM255%7CM257%7CM263%7CMU120%7CM366 and generates

– The [Google Charts maths equation plotter]( which takes a math formula and generates the Google Chart API code for the graph. E.g. for ![](;tex=%5Csin%28x%29-%5Ccos%28x%29%5Ccos%28x%29) we get

I look forward to trying these out in my own work!

Powered by [ScribeFire](

Author: cpjobling

Senior lecturer, College of Engineering, Swansea University