Use a graph from R to C #

I need your help ... solve my problem ...

I want to use a function plot()

from R

in C#

. However, I don't know how to put the plot I am getting from R into an image box or panel in C #.

Here is the code I used to get the graph from R:

engine.Evaluate("r.plot <- plot(r$condition, r$access, 
                                main='condition category vs access category',
                                xlab='condition', ylab='access', 
                                pch=1, col='blue')" );


How can I put a plot in an image field or panel in C # ???


source to share

1 answer

The best working option is to save the file from R and open it with a picture window. Several R.NET authors have written code currently in the alpha NuGet R.NET.Graphics package . It was a prototype for a seamless graphics device for R. A full device would be a lot of work and this graphics module is currently not actively developed (any game for it out there?).

Have a look at RDotNet.Graphics.Tests there is code showing side-by-side visual output through R.NET.Graphics and from the downloaded file.



All Articles