
{"id":1979,"date":"2026-07-07T10:00:00","date_gmt":"2026-07-07T08:00:00","guid":{"rendered":"https:\/\/www.pcjv.de\/?p=1979"},"modified":"2026-07-24T17:25:27","modified_gmt":"2026-07-24T15:25:27","slug":"2d-graphics-in-go-agg_go-and-matplotlib-go","status":"publish","type":"post","link":"https:\/\/www.pcjv.de\/?p=1979","title":{"rendered":"2D graphics in Go: agg_go and matplotlib-go"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Alongside audio, 2D graphics has been the second constant in my work \u2014 from the Graphics32 team years and AggPasMod to today. The modern chapter of that thread is written in Go: <a href=\"https:\/\/github.com\/CWBudde\/agg_go\" target=\"_blank\" rel=\"noopener\">agg_go<\/a> and <a href=\"https:\/\/github.com\/CWBudde\/matplotlib-go\" target=\"_blank\" rel=\"noopener\">matplotlib-go<\/a>.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">agg_go<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>agg_go<\/strong> is a port of Anti-Grain Geometry to Go. If that sounds familiar: I did this once before, fifteen years ago, when I turned AggPas into <a href=\"\/?page_id=1268\">AggPasMod<\/a> for modern Delphi. AGG&#8217;s approach \u2014 high-quality software rasterization with sub-pixel accuracy, built from small composable pipeline stages \u2014 has aged remarkably well, and porting it a second time was like meeting an old friend who has not changed while you have. This time the assembler optimizations of the Pascal era give way to Go&#8217;s tooling, tests and portability.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">matplotlib-go<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On top of the rendering layer sits <strong>matplotlib-go<\/strong>, a plotting library for Go inspired by Matplotlib: renderer-agnostic at the core, with high-quality raster backends today and vector\/GPU backends planned. It scratches an itch I have had since the measurement era \u2014 the VST Plugin Analyser exported stacked plots to PNG and SVG back in 2008, and I have wanted a proper, general plotting foundation ever since. Supporting geometry work like <a href=\"https:\/\/github.com\/CWBudde\/Go-Clipper2\" target=\"_blank\" rel=\"noopener\">Go-Clipper2<\/a>, a port of the Clipper2 polygon clipping library, rounds out the toolbox.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why ports?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A fair question \u2014 three of my larger projects are ports (AggPasMod, agg_go, go-dws). My answer: a good port is an act of preservation and a masterclass at once. You inherit two decades of edge cases already solved, and you understand every line because you had to retype it with intent. The originals were excellent; keeping them usable on modern stacks feels like honest work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Alongside audio, 2D graphics has been the second constant in my work \u2014 from the Graphics32 team years and AggPasMod to today. The modern chapter of that thread is written in Go: agg_go and matplotlib-go.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"class_list":["post-1979","post","type-post","status-publish","format-standard","hentry","category-go"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>2D graphics in Go: agg_go and matplotlib-go - Christian&#039;s private site<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pcjv.de\/?p=1979\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christian\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pcjv.de\\\/?p=1979#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pcjv.de\\\/?p=1979\"},\"author\":{\"name\":\"Christian\",\"@id\":\"https:\\\/\\\/www.pcjv.de\\\/#\\\/schema\\\/person\\\/79b654f8c2fb5bf9405ccc4cb1c11880\"},\"headline\":\"2D graphics in Go: agg_go and matplotlib-go\",\"datePublished\":\"2026-07-07T08:00:00+00:00\",\"dateModified\":\"2026-07-24T15:25:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pcjv.de\\\/?p=1979\"},\"wordCount\":282,\"articleSection\":[\"Go\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pcjv.de\\\/?p=1979\",\"url\":\"https:\\\/\\\/www.pcjv.de\\\/?p=1979\",\"name\":\"2D graphics in Go: agg_go and matplotlib-go - Christian&#039;s private site\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pcjv.de\\\/#website\"},\"datePublished\":\"2026-07-07T08:00:00+00:00\",\"dateModified\":\"2026-07-24T15:25:27+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.pcjv.de\\\/#\\\/schema\\\/person\\\/79b654f8c2fb5bf9405ccc4cb1c11880\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pcjv.de\\\/?p=1979#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pcjv.de\\\/?p=1979\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pcjv.de\\\/?p=1979#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pcjv.de\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"2D graphics in Go: agg_go and matplotlib-go\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pcjv.de\\\/#website\",\"url\":\"https:\\\/\\\/www.pcjv.de\\\/\",\"name\":\"Christian&#039;s private site\",\"description\":\"Private site of Christian-W. Budde\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pcjv.de\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.pcjv.de\\\/#\\\/schema\\\/person\\\/79b654f8c2fb5bf9405ccc4cb1c11880\",\"name\":\"Christian\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/009d545df1a458e74ec172fa5dc19428c1144c2ee8f1ec82d94c3b28f12a0c14?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/009d545df1a458e74ec172fa5dc19428c1144c2ee8f1ec82d94c3b28f12a0c14?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/009d545df1a458e74ec172fa5dc19428c1144c2ee8f1ec82d94c3b28f12a0c14?s=96&d=mm&r=g\",\"caption\":\"Christian\"},\"sameAs\":[\"http:\\\/\\\/www.savioursofsoul.de\\\/Christian\"],\"url\":\"https:\\\/\\\/www.pcjv.de\\\/?author=3\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"2D graphics in Go: agg_go and matplotlib-go - Christian&#039;s private site","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pcjv.de\/?p=1979","twitter_misc":{"Written by":"Christian","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pcjv.de\/?p=1979#article","isPartOf":{"@id":"https:\/\/www.pcjv.de\/?p=1979"},"author":{"name":"Christian","@id":"https:\/\/www.pcjv.de\/#\/schema\/person\/79b654f8c2fb5bf9405ccc4cb1c11880"},"headline":"2D graphics in Go: agg_go and matplotlib-go","datePublished":"2026-07-07T08:00:00+00:00","dateModified":"2026-07-24T15:25:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pcjv.de\/?p=1979"},"wordCount":282,"articleSection":["Go"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.pcjv.de\/?p=1979","url":"https:\/\/www.pcjv.de\/?p=1979","name":"2D graphics in Go: agg_go and matplotlib-go - Christian&#039;s private site","isPartOf":{"@id":"https:\/\/www.pcjv.de\/#website"},"datePublished":"2026-07-07T08:00:00+00:00","dateModified":"2026-07-24T15:25:27+00:00","author":{"@id":"https:\/\/www.pcjv.de\/#\/schema\/person\/79b654f8c2fb5bf9405ccc4cb1c11880"},"breadcrumb":{"@id":"https:\/\/www.pcjv.de\/?p=1979#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pcjv.de\/?p=1979"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pcjv.de\/?p=1979#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pcjv.de\/"},{"@type":"ListItem","position":2,"name":"2D graphics in Go: agg_go and matplotlib-go"}]},{"@type":"WebSite","@id":"https:\/\/www.pcjv.de\/#website","url":"https:\/\/www.pcjv.de\/","name":"Christian&#039;s private site","description":"Private site of Christian-W. Budde","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pcjv.de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.pcjv.de\/#\/schema\/person\/79b654f8c2fb5bf9405ccc4cb1c11880","name":"Christian","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/009d545df1a458e74ec172fa5dc19428c1144c2ee8f1ec82d94c3b28f12a0c14?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/009d545df1a458e74ec172fa5dc19428c1144c2ee8f1ec82d94c3b28f12a0c14?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/009d545df1a458e74ec172fa5dc19428c1144c2ee8f1ec82d94c3b28f12a0c14?s=96&d=mm&r=g","caption":"Christian"},"sameAs":["http:\/\/www.savioursofsoul.de\/Christian"],"url":"https:\/\/www.pcjv.de\/?author=3"}]}},"_links":{"self":[{"href":"https:\/\/www.pcjv.de\/index.php?rest_route=\/wp\/v2\/posts\/1979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pcjv.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pcjv.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pcjv.de\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pcjv.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1979"}],"version-history":[{"count":1,"href":"https:\/\/www.pcjv.de\/index.php?rest_route=\/wp\/v2\/posts\/1979\/revisions"}],"predecessor-version":[{"id":2107,"href":"https:\/\/www.pcjv.de\/index.php?rest_route=\/wp\/v2\/posts\/1979\/revisions\/2107"}],"wp:attachment":[{"href":"https:\/\/www.pcjv.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pcjv.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pcjv.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}