Friday, May 20, 2011 9:29 AM
Please could someone post a little example of producing a plot from within F# interactive. I've have Yin's example of using the array library from within F# working but I just can't seem to get a plot to work.
Also, I'd just like to add my support for Sho. Like many here I'm excited to see Sho (and technical computing in general) coming out of Microsoft. I am a long time user of Matlab (for quant finance) but I would really love to leave it behind for a modern language. I like python and I love F# and for me its the interactive visualisation part that still needs some work.
I've tried various 3rd party libraries and some are ok but I'd really like to see a single nice complete and consistent set of viz functions. Sho looks like its going that way. More please!
Sunday, May 29, 2011 7:04 AM
Here is the code snippet you need:
// Reference Sho runtime #r "MathFunc.dll" #r "MatrixInterf.dll" #r "ShoArray.dll" #r "ShoViz.dll" #r "PythonExt.dll" // Open Sho namespaces open ShoNS.Array open ShoNS.Visualization open ShoNS.MathFunc
// s is an sho array
// Draw line chart with circles for each value ShoPlotHelper.Plot(s, "ro-") // Draw bar chart ShoPlotHelper.Bar(s)
The visualization in Sho is a C# wrapper to Microsoft Chart Controls.
I would also like to recommend you two other F# wrappers to Microsoft Chart Controls:
- Yin Zhu