fslaborg / fslaborg/XPlot

XPlot in a C# .NET Console App (not a jupyter notebook)

Open
#143 3 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
F#
Stars
289
Forks
70
PR merge metrics
No merged PRs in 30d

Description

Hey,
Great work on XPlot.

Any plans to support XPlot in a C# Console App (not a jupyter notebook)?
I get a plot window, with the following code, but no data is drawn.

```
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Microsoft.ML;
using Microsoft.ML.AutoML;
using Microsoft.ML.Data;
using Microsoft.ML.Featurizers;
using Tensorflow;
using XPlot.Plotly;

namespace BottleRocketClassify {
internal static class Program {
public static class ModelBuilder {
public static void Run() {
var mlContext = new MLContext(seed: 1);

var trainDataView = mlContext.Data.LoadFromTextFile(
path: @"../../../data/train.csv",
hasHeader: true,
separatorChar: ',');

int numberOfRows = 1000;
var boxRatio =
trainDataView.GetColumn("BoxRatio").Take(numberOfRows).ToArray();

var data = boxRatio.Cast();
var chart = new PlotlyChart();
Chart.Bar(data);
Chart.Show(chart);
}
}
}
}
```
Charles

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.