You cannot specify colors of lines and symbols directly from
gnuplot. One of the easiest way to do is, make an obj file of Tgif
by setting set term tgif , and edit your figure with
Tgif, then save it in a color PS format.

Here is a tricky way to change the colors. Edit the postscript file
by hand. The PS file generated by gnuplot is rather easy to
read. With the following gnuplot commands you can get a color
index. Of course the test command yields the color
index, too.

Ten line types are defined in the PostScript terminal, those are
numbered from 1 to 9. Above, functions y=1 to y=10
are displayed with the various line types. In order to see the
color clearly very thick lines are used there.

Do the same thing but with a B/W PostScript. Remove the color
option, and save the output into "monoindex.ps". You can see
the difference between "colorindex.ps" and "monoindex.ps" with the
diff command on UNIX. The difference is only one line, /Color
true def and /Color false def . Therefore you can
choose color or B/W without gnuplot by editing this part /Color
{true |false}.

Lets read the PS file generated above, you can easily find the place
where colors are defined. Near line 40th, you see the following
section (extra spaces are inserted here to align).

Those lines correspond to the line types 1 to 9. Three numbers in
LT0, "1 0 0" defines RGB (Red, Green, and Blue), then LT0 becomes
red. In the same manner, LT1 is green, LT2 is blue...and
(1,0,1)=Magenta, (0,1,1)=Cyan, (1,1,0)=Yellow, (0,0,0)=Black,
(1,0.3,0)=Orange, and (0.5,0.5,0.5)=Gray. Now you can change the
line color by changing these RGB values.

To make a gradation from red to yellow, fix the R=1 and Blue=0, and
change G from 0 to 1 gradually.

The results are as follows. The first image is generated with gnuplot,
while the second one is made with editing the PS file as described above.
With this method you can use any colors in you figure. An automatic conversion
of those colors can be achieved with some programs like perl or sed.

ColorPS generated by gnuplot

PS file edited

Now, go back to the postscript data above, you can see "[4 dl 2 dl]"
which defines a line pattern to draw dotted, dot-dashed, and dashed
lines. For LT1, the pattern is defined as "[4 dl 2 dl]". This gives
a solid line of 4 unit length and a space of 2 unit length, so that
it becomes a dashed-line. "[5 dl 2 dl 1 dl 2 dl]" defines a solid
line of 5 unit length, space of 2, line of 1, and space of 2, and
so on. If you need an extra line pattern, edit here to make your
own.

In the PS file you can find the following 2 lines, those are just above
the definition of LT0.

A square figure can be drawn by set size square . However,
an EPS file generated with gnuplot is not square but still
rectangular, and you get extra margin. The reason is that gnuplot
determines BoundingBox so as to cover the whole screen. In order to
get rid of the right-side margin, you need to edit the EPS file by
hand. The BoundingBox is defined at the top of the generated EPS
file.

%%BoundingBox: 50 50 410 302

This "410" is too large in this case, then reduce it. An
appropriate BoundingBox coordinate depends on the label and margin,
so that you may find the best number after some try-and-errors. In
the above case, about 320 works fine because the vertical size is
302.

If you are working on Unix or Linux, and your system has
GhostScript, probably you have ps2ps, eps2eps
commands. Those shell scripts convert your PostScript graphs
generated by gnuplot into more proper PS file. You can adjust your BoundingBox
with the following command.