title: How to plot graph in Java using R language (read.csv(file))
body: <p>I’d like to plot graph in java using r language which import data from file.csv. I have problem my output is blank. In netbeans, the programe run success don't have error but the garph can't show and In R studio, the graph can show normally.</p>
  
  <h1>This my code in r studio:</h1>
  
  <pre><code>//import file.csv
  
  RealDataErq &lt;- read.csv("C:.../erq_csv_comma.csv",header = TRUE)
  
  //create garph by Request.By
  
  RealDataErq_RequesterBy &lt;- aggregate(RealDataErq$NUMBER, by=list(Status=RealDataErq$Request.By), FUN=sum)
  
  //plot garph
  
  plot(RealDataErq_RequesterBy)
  </code></pre>
  
  <h1>this my code in netbeans:</h1>
  
  <pre class="lang-java prettyprint-override"><code>package rserveproject;
  
  import java.io.File;
  import java.io.IOException;
  import javax.swing.ImageIcon;
  import org.rosuda.REngine.REXP;
  import org.rosuda.REngine.Rserve.RConnection;
  import org.rosuda.REngine.Rserve.RserveException;
  import rcaller.RCaller;
  /**
   *
   */
  public class Graph2Erp {
       public static void main(String a[]) throws IOException {
           RConnection connection = null; 
           try {                
                  RCaller caller = new RCaller();
                  caller.setRscriptExecutable("C:\\\\Program Files\\\\R\\\\R-3.3.1\\\\bin\\\\i386\\\\Rscript");
                  caller.cleanRCode();
                  connection = new RConnection();
                  REXP x;
  //                connection.eval("RealDataErq &lt;- read.csv(file='C:\\\\Users\\\\.....\\\\Desktop\\\\erq_csv_comma.csv', sep=' ', colClasses=c(NA, NA, NA))");
                  connection.eval("RealDataErq &lt;- read.csv('C:\\\\Users\\\\.....\\\\Desktop\\\\erq_csv_comma.csv',header = TRUE)");
                  connection.eval("RealDataErq_RequesterBy &lt;- aggregate(RealDataErq$NUMBER, by=list(Status=RealDataErq$Request.By), FUN=sum)");
                  File file = caller.startPlot();
                  connection.eval("plot(RealDataErq_RequesterBy)");
                  caller.endPlot();
                  caller.runOnly();
                  ImageIcon ii = caller.getPlot(file);
                  caller.showPlot(file);
  
           } catch (RserveException e) {
               e.printStackTrace();
           } 
           finally{
               connection.close();
           }
       }
  }
  </code></pre>
  
  <p>This my output in netbeans:</p>
  
  <p><img src="https://i.stack.imgur.com/YCRbs.png"></p>
  
  <p>this my file.csv: 
   <a href="https://drive.google.com/drive/folders/0B3ynuWBsKXoHY2tSQVdQZU4tVlE?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/drive/folders/0B3ynuWBsKXoHY2tSQVdQZU4tVlE?usp=sharing</a></p>
  
  <p>I wouldn't to use a JavaGD. Do you have another solution?</p>