0

Gnuplot's set term dumb is useful for visualizing data directly on a remote PC, where a GUI may not be available.

However, I am seeing an issue, where the legend becomes obscured, causing the result to be unreadable. It seems like the plot lines are put on top of the legend:

>>> gnuplot -e "set term dumb 60 20; plot sin(4*x) title 'Hello World Hello World'"

    1 +-------------------------------------------------+   
      | **  **  ** +**  *   *  +*   *  **  **  **  **  *|   
  0.8 |-**  **  **  **  **ll**Wo*ld**el** W**ld*********|   
  0.6 |-**  **  **  **  **  ** * * **  **  **  **  ** +*|   
      | **  **  **  ** * * * * * * * * **  **  **  **  *|   
  0.4 |-**  **  ** * * * * * * * * * * * * **  **  ** +*|   
  0.2 |-**  ** * * * * * * * * * * * * * * * * **  ** +*|   
      | ** * * * * * * * * * * * * * * * * * * * * **  *|   
    0 |*+* * * * * * * * * * * * * * * * * * * * * * *+*|   
      |*  ** * * * * * * * * * * * * * * * * * * * * ** |   
 -0.2 |*+ **  ** * * * * * * * * * * * * * * * * **  **-|   
 -0.4 |*+ **  **  ** * * * * * * * * * * * * **  **  **-|   
      |*  **  **  **  ** * * * * * * * * **  **  **  ** |   
 -0.6 |*+ **  **  **  **  ** * * **  **  **  **  **  **-|   
 -0.8 |*+ **  **  **  **  **  *  **  **  **  **  **  **-|   
      |*  **  **  **  **  *   *+  *   *  ** +**  **  ** |   
   -1 +-------------------------------------------------+   
     -10          -5           0            5           10  

How can this be prevented?

(Found the solution while formulating the question, posting as Q&A).

1 Answer 1

0

In order to prevent this, the legend has to be configured to be opaque with set key opaque:

>>> gnuplot -e "set term dumb 60 20; set key opaque; plot sin(4*x) title 'Hello World Hello World'"

    1 +-------------------------------------------------+   
      | **  **  ** +**  *   *  +*   *  **  **  **  **  *|   
  0.8 |-**  **  **  **  Hello World Hello World*********|   
  0.6 |-**  **  **  **  **  ** * * **  **  **  **  ** +*|   
      | **  **  **  ** * * * * * * * * **  **  **  **  *|   
  0.4 |-**  **  ** * * * * * * * * * * * * **  **  ** +*|   
  0.2 |-**  ** * * * * * * * * * * * * * * * * **  ** +*|   
      | ** * * * * * * * * * * * * * * * * * * * * **  *|   
    0 |*+* * * * * * * * * * * * * * * * * * * * * * *+*|   
      |*  ** * * * * * * * * * * * * * * * * * * * * ** |   
 -0.2 |*+ **  ** * * * * * * * * * * * * * * * * **  **-|   
 -0.4 |*+ **  **  ** * * * * * * * * * * * * **  **  **-|   
      |*  **  **  **  ** * * * * * * * * **  **  **  ** |   
 -0.6 |*+ **  **  **  **  ** * * **  **  **  **  **  **-|   
 -0.8 |*+ **  **  **  **  **  *  **  **  **  **  **  **-|   
      |*  **  **  **  **  *   *+  *   *  ** +**  **  ** |   
   -1 +-------------------------------------------------+   
     -10          -5           0            5           10  

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .