title: Can't find qt or x11 terminal gnuplot with CATALINA
body: <p>I installed gnuplot on my Macbook with Catalina 10.15.13. When I use it in Xcode it does not show me anything, it provides</p>
  <blockquote>
  <p>WARNING: Plotting with an 'unknown' terminal.</p>
  <p>No output will be generated. Please select a terminal with 'set terminal'.</p>
  </blockquote>
  <p>Having said that, I saw that to plot data I would need of the terminals qt or x11 which I do not have. The questions are two:</p>
  <ol>
  <li><p>How can I install them? homebrew does not allow me to use brew &quot;install gnuplot --with-x11&quot;</p>
  </li>
  <li><p>In order to see the data, Do I have to need of this two terminals? Can't I use another one?</p>
  </li>
  </ol>
  <p>What I'm asked to do is to call gnuplot inside my program, and not controlling it from the terminal. It works, but it does not keep thw window with chart open. Inside utils.h there are some function and the structure instance, but it does not have nothing to do with gnuplot.
  My code is:</p>
  <pre><code>#include &quot;utils.h&quot;
  #include &lt;stdio.h&gt;
  
  
  char* commandsForGnuplot[] = {
  &quot;set style increment default&quot;,
  &quot;set title 'Simple Plots'&quot;,
  &quot;set title  font ',20' norotate&quot;,
  &quot;set xrange[*:*] noreverse writeback&quot;,
  &quot;set x2range[*:*] noreverse writeback&quot;,
  &quot;set yrange[*:*] noreverse writeback&quot;,
  &quot;set y2range[*:*] noreverse writeback&quot;,
  &quot;set zrange[*:*] noreverse writeback&quot;,
  &quot;set cbrange[*:*] noreverse writeback&quot;,
  &quot;set rrange[*:*] noreverse writeback&quot;,
  &quot;plot[-pi / 2:pi] cos(x), -(sin(x) &gt; sin(x + 1) ? sin(x) : sin(x + 1))&quot;
  };
  
  
  
  int main(int argc, const char * argv[]) {
     int n_commands = 11;
  
     if ( argc &lt; 2 ) { printf(&quot;Usage: %s -help for help\n&quot;, argv[0]); exit(1); }
     if ( VERBOSE &gt;= 2 ) { for (int a = 0; a &lt; argc; a++) printf(&quot;%s &quot;, argv[a]); printf(&quot;\n&quot;); }
  
     instance inst;
  
    //////////////////////////////////////////////////////////
    // Parse the command line
    //////////////////////////////////////////////////////////
    parse_command_line(argc,argv, &amp;inst);
      
    //printf(&quot; file %s has %d non-empty lines\n&quot;, inst.input_file, number_of_nonempty_lines(inst.input_file)); exit(1);
  
    //////////////////////////////////////////////////////////
    // Parse the input file
    //////////////////////////////////////////////////////////
    read_input(&amp;inst);
    //    if ( VRPopt(&amp;inst) ) print_error(&quot; error within VRPopt()&quot;);
    
  
    // debug print
    instance_tostring(&amp;inst);
       
    FILE* gnuplotPipe = popen(&quot;/usr/local/bin/gnuplot&quot;, &quot;w&quot;);
    if (!gnuplotPipe) { perror(&quot;popen gnuplot&quot;); exit(EXIT_FAILURE); };
  
    for (int i = 0; i &lt; n_commands; i++)
    {
        fprintf(gnuplotPipe, &quot;%s \n&quot;, commandsForGnuplot[i]);
        printf(&quot;%s \n&quot;, commandsForGnuplot[i]);
    }
    pclose(gnuplotPipe);
    
    return 0;
  </code></pre>
  <p>}</p>