I have the following code to plot my input series using R charts from my C# application:
FormatoPlot = string.Format("png('{0}',{1},{2})", plotTSPath.Replace('\\', '/'), pbPlotTS.Width, pbPlotTS.Height);
objR.Evaluate(FormatoPlot);
string ComandoPlot= "ploteo<-ggplot(ts_s, color= 'blue', linetype = 'solid', main='Serie Original de Tiempo')";
objR.Evaluate("library(ggplot2)");
objR.Evaluate("library(ggfortify)");
objR.Evaluate(ComandoPlot);
objR.Evaluate("print(ploteo)");
objR.Evaluate("dev.off()");
pbPlotTS.ImageLocation = plotTSPath;
pbPlotTS.Refresh();
}
My input is a time series, with normal plot works great, but when I use ggplot for a better design of graphic, ggplot doesn't work, only just shows a gray screen