|
From: Joseph W. <jo...@gn...> - 2007-01-31 23:59:20
|
I got a hello world plot that interfaces QuantLib with tvtk I was wondering if there are any volumetric quantities in QuantLib that would be worth ploting? Running with ipython -wthread import scipy import numpy import QuantLib # prepare some interesting function: surface = QuantLib.TestSurface() x = scipy.arange(-7., 7.05, 0.1) y = scipy.arange(-5., 5.05, 0.1) # 3D visualization of f: from enthought.tvtk.tools import mlab fig = mlab.figure() s = mlab.SurfRegular(x, y, scipy.vectorize(lambda x, y:surface(x,y))) fig.add(s) -- ------------------------------------------------------------------------------- Joseph Wang Ph.D. - jo...@gn... China Derivatives Researcher and Software Developer - QuantLib http://en.wikiversity.org/wiki/User:Roadrunner |