From 24c0e5c0101387b3e5f4d6cf1ebabb53eb8592e0 Mon Sep 17 00:00:00 2001 From: emile Date: Mon, 8 Oct 2018 16:52:19 +0200 Subject: Explain why the Y Axis is inverted --- draw/draw.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draw/draw.go b/draw/draw.go index 177c8f1..92c577b 100644 --- a/draw/draw.go +++ b/draw/draw.go @@ -8,7 +8,6 @@ import ( // initializePlot generates a new plot and returns the plot context func initializePlot() *gg.Context { - // Define the image size const image_width = 8192 const image_height = 8192 @@ -20,6 +19,7 @@ func initializePlot() *gg.Context { dc.SetRGB(0, 0, 0) dc.Clear() + // Invert the Y axis (positive values are on the top and right) dc.InvertY() // Set the coordinate midpoint to the middle of the image -- cgit 1.4.1