Indigenous Chart plotting features integrated into Xamarin Workbook

jim_seowjim_seow Jim SeowDEMember ✭✭

In testing/porting python code to TensorflowSharp in Xamarin Workbook

I came into this juypter tensorflow python example involving inline chart

Ideally, I would like that also in Xamarin Workbook (document everything and sharing results through Xamarin Workbook).
=> TensorFlowSharp code in Xamarin Workbook without the inline chart

Question. what is the best way to implement this feature? Which future version of Workbook will integrate that feature?
Shall we use a third party DLL can call it each time we need to plot some simple chart?
Alternatively, can we consider python's Mathplotlib ported to .NET using pythonNET to draw simple chart in Workbook?

Lastly, perhaps there is some indigenous chart library api in Workbook that we can call to allow us to display simple chart in Console mode of Workbook

As a wishful thought :-)

We also discuss if pythonNET could help in making Xamarin Workbook console mode more effective in porting python code to .NET using Xamarin Workbook

Posts

  • abockabock Aaron Bockover USXamarin Team, Insider Xamurai

    Hi @jim_seow!

    I plan on publishing an integration for OxyPlot soon. In the mean time, you can begin rendering PlotModel objects with a pretty simple representation provider that returns a PlotModel as an SVG image:

    InteractiveAgent.RepresentationManager.AddProvider<PlotModel> (plotModel => {
        var exporter = new SvgExporter {
            Width = 300,
            Height = 250
        };
    
        var svgUri = "data:image/svg+xml;utf8," + exporter.ExportToString (plotModel);
    
        return new Image (
            Xamarin.Interactive.Representations.ImageFormat.Uri,
            Encoding.UTF8.GetBytes (svgUri),
            (int)exporter.Width,
            (int)exporter.Height);
    })
    

    See the full workbook for more details.

  • abockabock Aaron Bockover USXamarin Team, Insider Xamurai

    @jim_seow I forgot to mention - as for implementing rich support for TensorFlowSharp itself, see our SDK documentation on integrations that can be shipped via NuGet.

    The AddProvider trick above is useful for iterating on an integration within Workbooks itself. You can then port the code to a more complete/NuGet-packaged library will load behind the scenes just by referencing the NuGet.

    The integration SDK is still under development, but was greatly improved in our 1.3 release. It's very currently capable, but have identified and are working on a few areas to make the development of integrations a little easier. Nonetheless, we would greatly welcome your feedback on what's available today!

    Thanks!

  • jim_seowjim_seow Jim Seow DEMember ✭✭
    edited June 6

    @abock Let us boldly go where no man has gone before

    Ideally, we could integrate this :: tool into WORKBOOK.

    The user specify the number of inputs, outputs, number of hidden layers, no of nodes per each hidden layer, send that into this link, capture the image, and past that into the output of the cell.

    We are also discussing using Workbook to support .NET for CNTK

  • jim_seowjim_seow Jim Seow DEMember ✭✭

    Just found an interesting use of Xamarin Workbook with 3D surface chart

  • jim_seowjim_seow Jim Seow DEMember ✭✭
  • larcailarcai Stephanus van Staden ZAMember
    edited June 18

    Today I created another 2 workbooks showing off the Accord Framework on Xamarin Workbooks
    Find these Workbooks Here


  • larcailarcai Stephanus van Staden ZAMember

    The screenshots

Sign In or Register to comment.