diff --git a/README.txt b/README.txt
index a77b7a78e6ad20fa2b2096a84f8d25584bba1b5a..bbd1cba2126e7f157dc269f144bc3d848fd4add2 100644
--- a/README.txt
+++ b/README.txt
@@ -32,5 +32,8 @@ $ e-plot --help
 
 Keybinding:
 
-h,l - Move left and right
-H,L - Zoom out and in
+←, h       - Move left
+→, l       - Move right
+Shift+←, H - Zoom out
+Shift+→, L - Zoom in
+v          - Toggle legend
diff --git a/src/main.c b/src/main.c
index c2d03c3065a89e8788605be7bf541576d81cf8e6..368ecac7ac395e259e6525900f4d0a76a23249f0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -42,6 +42,7 @@ struct context {
 
 	struct {
 		char* header;
+		PangoLayout* legend;
 		enum { XAXIS, LEFT_AXIS, RIGHT_AXIS, IGNORE, } type;
 	} * columns;
 	size_t n_columns;
@@ -93,6 +94,8 @@ struct context {
 		int n;
 	} xtick_layouts, yltick_layouts, yrtick_layouts;
 
+	bool show_legend;
+
 };
 
 struct fd_source {
@@ -133,6 +136,7 @@ int main( int argc, char** argv ) {
 	context->xfit = true;
 	context->xfollow = true;
 	context->font_size = 12;
+	context->show_legend = true;
 
 	static const char* colours[] = {
 		"#005C84", "#FCBC00", "#0C838C", "#E63037",
@@ -479,6 +483,18 @@ static int key_callback( GtkEventControllerKey* event_controller,
 
 		}
 
+		case 'v': {
+
+			if ( 0 == mods ) {
+				context->show_legend = !context->show_legend;
+				gtk_widget_queue_draw( context->plot );
+				return true;
+			}
+
+			return false;
+
+		}
+
 		default: {
 
 			return false;
@@ -1424,6 +1440,109 @@ static void plot_draw( GtkDrawingArea* plot,
 
 	cairo_restore( cr );
 
+	/* Legend */
+
+	if ( context->show_legend ) {
+
+		double w = 0;
+		double h = 0.5 * context->font_size;
+
+		for ( size_t i = 0; i < context->n_columns; i++ ) {
+
+			if ( XAXIS == context->columns[i].type ||
+					IGNORE == context->columns[i].type ) {
+				continue;
+			}
+
+			if ( NULL == context->columns[i].legend ) {
+
+				context->columns[i].legend =
+					pango_cairo_create_layout( cr );
+				pango_layout_set_font_description(
+					context->columns[i].legend,
+					context->tick_font_description );
+				pango_layout_set_text( context->columns[i].legend,
+					context->columns[i].header, -1 );
+
+			}
+
+			int lw, lh;
+			pango_layout_get_pixel_size( context->columns[i].legend,
+				&lw, &lh );
+
+			if ( w < lw + 5 * context->font_size ) {
+				w = lw + 5 * context->font_size;
+			}
+			h += lh + 0.5 * context->font_size;
+
+		}
+
+		cairo_save( cr );
+		cairo_set_line_width( cr, 1 );
+		cairo_move_to( cr, m[1], m[2] );
+		cairo_line_to( cr, m[1] + w, m[2] );
+		cairo_line_to( cr, m[1] + w, m[2] + h );
+		cairo_line_to( cr, m[1], m[2] + h );
+		cairo_line_to( cr, m[1], m[2] );
+		cairo_set_source_rgb( cr, 1, 1, 1 );
+		cairo_fill_preserve( cr );
+		cairo_set_source_rgb( cr, 0, 0, 0 );
+		cairo_stroke( cr );
+		cairo_restore( cr );
+
+		h = 0.5 * context->font_size + m[2];
+
+		size_t c = 0;
+
+		for ( size_t i = 0; i < context->n_columns; i++ ) {
+
+			if ( XAXIS == context->columns[i].type ||
+					IGNORE == context->columns[i].type ) {
+				continue;
+			}
+
+			int lw, lh;
+			pango_layout_get_pixel_size( context->columns[i].legend,
+				&lw, &lh );
+
+			if ( context->columns[i].type == LEFT_AXIS ) {
+				cairo_move_to( cr, m[1] + context->font_size * 4, h );
+			} else {
+				cairo_move_to( cr, m[1] + context->font_size * 1, h );
+			}
+
+			cairo_save( cr );
+			cairo_set_source_rgb( cr, 0, 0, 0 );
+			pango_cairo_show_layout( cr,
+				context->columns[i].legend );
+			cairo_restore( cr );
+
+			if ( context->columns[i].type == LEFT_AXIS ) {
+				cairo_move_to( cr,
+					m[1] + context->font_size * 1, h + lh / 2 );
+				cairo_line_to( cr,
+					m[1] + context->font_size * 3, h + lh / 2 );
+			} else {
+				cairo_move_to( cr,
+					m[1] + w - context->font_size * 3, h + lh / 2 );
+				cairo_line_to( cr,
+					m[1] + w - context->font_size * 1, h + lh / 2 );
+			}
+
+			cairo_save( cr );
+			cairo_set_source_rgb( cr, context->colours[c][0],
+				context->colours[c][1], context->colours[c][2]);
+			cairo_set_line_width( cr, 1 );
+			cairo_stroke( cr );
+			cairo_restore( cr );
+
+			h += lh + 0.5 * context->font_size;
+			c = ( c + 1 ) % context->n_colours;
+
+		}
+
+	}
+
 }
 
 static int pretty( double* lo, double* up, int ndiv ) {