Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

Commented Unassigned: Real-Time plotting [159]

$
0
0
I launch the code below to emulate a realtime chart building

```
using (REngine engine = REngine.GetInstance())
{
var values = new double[100];
var rnd = new Random();
for (int i = 0; i < values.Length; i++)
{
values[i] = rnd.NextDouble();
var command = string.Format("y <-c({0})", string.Join(", ", values));
engine.Evaluate(command);
engine.Evaluate("plot(y)");
Thread.Sleep(100);
}
}
```

Why the window is freezing after program finishing and how to clear a memory when the chart done.
Comments: I run that code in VS2013 with the latest R.Net and I don't have an issue with the "window freezing". I created a console app that I run from the command line and everything works and exits fine. If I run under the debugger, the console window doesn't like to close, presumably due to the thread and message pump created by the R process, but that's solely a debugger issue.

Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>