Syntax:
set terminal dumb {size <xchars>,<ychars>} {[no]feed} {aspect <htic>{,<vtic>}} {[no]enhanced} {mono|ansi|ansi256|ansirgb}
where 4#4xchars5#5 and 4#4ychars5#5 set the size of the text block. The default is 79 by 24. The last newline is printed only if feed is enabled.
The aspect option can be used to control the aspect ratio of the plot by setting the length of the horizontal and vertical tic marks. Only integer values are allowed. Default is 2,1 – corresponding to the aspect ratio of common screen fonts.
The ansi, ansi256, and ansirgb options will include escape sequences in the output to handle colors. Note that these might not be handled by your terminal. Default is mono. To obtain the best color match in ansi mode, you should use set colorsequence classic. Depending on the mode, the dumb terminal will emit the following sequences (without the additional whitespace):
ESC [ 0 m reset attributes to defaults foreground color: ESC [ 1 m set intense/bold ESC [ 22 m intense/bold off ESC [ <fg> m with color code 30 <= <fg> <= 37 ESC [ 39 m reset to default ESC [ 38; 5; <c> m with palette index 16 <= <c> <= 255 ESC [ 38; 2; <r>; <g>; <b> m with components 0 <= <r,g,b> <= 255 background color: ESC [ <bg> m with color code 40 <= <bg> <= 47 ESC [ 49 m reset to default ESC [ 48; 5; <c> m with palette index 16 <= <c> <= 231 ESC [ 48; 2; <r>; <g>; <b> m with components 0 <= <r,g,b> <= 255
See also e.g. the description at https://en.wikipedia.org/wiki/ANSI_escape_code#Colorshttps://en.wikipedia.org/wiki/ANSI_escape_code#Colors
Example:
set term dumb mono size 60,15 aspect 1 set tics nomirror scale 0.5 plot [-5:6.5] sin(x) with impulse ls -1
1 +-------------------------------------------------+ 0.8 +|||++ ++||||++ | 0.6 +|||||+ ++|||||||+ sin(x) +----+ | 0.4 +||||||+ ++|||||||||+ | 0.2 +|||||||+ ++|||||||||||+ +| 0 ++++++++++++++++++++++++++++++++++++++++++++++++++| -0.2 + +|||||||||||+ +|||||||||||+ | -0.4 + +|||||||||+ +|||||||||+ | -0.6 + +|||||||+ +|||||||+ | -0.8 + ++||||+ ++||||+ | -1 +---+--------+--------+-------+--------+--------+-+ -4 -2 0 2 4 6