![]() | |
![]() |
![]() ![]() ![]() ![]() |
![]() |
... but gnuplot calls it "key"
There are two ways. The first one is,
|
Usually a legend appears at the top/right corner int the graph. You can change the position with the set key command. If you give the command,
the legend goes to left/bottom. Available options are, left, right, top, bottom, outside, and below. You can combine some of them. For example, outside bottom. It is possible to set the position of legend directly. If you want to move it to the position (X,Y)=(100,100),
|
When one plots data with error bars, the error bar also appears in the legend (see the figure below). However, even if the data have errors in the Y-direction, the error bar in the legend becomes horizontal one, and usually we do not need such an error bar. Here is a simple way to remove the error bar in the legend. When we plot the next data (test.dat),
with the following commands,
![]() the error bar in the legend becomes like above.
![]() |
You can change the line-skip in the legend with set key spacing command. To make the skip 1.5 times wider, set key spacing 1.5 |
To make a frame-box around the legend, use set key box . The line-kind for the box is the same as the frame of the graph. You can change this by providing the box keyword followed by an index of the line-kind. Otherwise you can define the linestyle as:
|
![]() | |
![]() |
![]() ![]() ![]() ![]() |
![]() |