Rather than use Ruby or Python solely for this, I'd recommend taking a look at the "D3.js" library.
You can take advantage of the browser's ability to generate graphics, and the D3 library's multitude of different plots and charts. It's very impressive and should be easy to integrate with Python or Ruby acting as the data generators, feeding the browser via JSON.