diff --git a/src/main.c b/src/main.c
index 091ec4ffb93624cdb01670f05353845d4c7e6b60..b6093eea66b06164e8d1bcf1850387d28fdb0852 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1371,7 +1371,7 @@ static void plot_draw( GtkDrawingArea* plot,
 			&xlab_w, &xlab_h );
 		cairo_move_to( cr,
 			m[1] + ( width - m[1] - m[3] ) / 2 - xlab_w / 2,
-			height - xlab_h - 3 );
+			height - m[0] + margin_reqs[0] - xlab_h - 3 );
 		pango_cairo_show_layout( cr, context->xlab_layout );
 	}
 
@@ -1383,7 +1383,7 @@ static void plot_draw( GtkDrawingArea* plot,
 		pango_layout_get_pixel_size( context->yllab_layout,
 			&yllab_w, NULL );
 		cairo_move_to( cr,
-			3,
+			m[1] - margin_reqs[1] + 3,
 			m[2] + ( height - m[2] - m[0] ) / 2 + yllab_w / 2 );
 		cairo_rotate( cr, - M_PI / 2 );
 		pango_cairo_show_layout( cr, context->yllab_layout );
@@ -1397,7 +1397,7 @@ static void plot_draw( GtkDrawingArea* plot,
 		pango_layout_get_pixel_size( context->yrlab_layout,
 			&yrlab_w, NULL );
 		cairo_move_to( cr,
-			width - 3,
+			width - m[3] + margin_reqs[3] + 5,
 			m[2] + ( height - m[2] - m[0] ) / 2 - yrlab_w / 2 );
 		cairo_rotate( cr, M_PI / 2 );
 		pango_cairo_show_layout( cr, context->yrlab_layout );