Avatar (Fabio Alessandro Locati|Fale)'s blog

Sensible datetime scale for Gonum Plot

June 28, 2021

Few months ago I posted a library for sensible int scale for Gonum Plot. There is a similar package I’ve developed to handle timescales.

The integer one, being based on a recursive function, works with any number scale. Differently, this one will only work well with a timescale between 2 days and a couple of years. Extending it is not hard since it’s enough to add additional case statements in the switch, but I’ve not found use-cases for different timeframes so far. If you add additional options, please commit them back!

Read More

Sensible integer scale for Gonum Plot

January 20, 2021

Over the years, I found myself multiple times using Gonum Plot. I do find it as a very good and easy to use plotting tool for Go.

The problem I found myself, over and over, dealing with is the tickers scale. If you know before-hand the values that can be expected to be created by the application, it is very straightforward, but the majority of times, this is not the case. I often find myself creating a plotting application on data that track events that have not yet happened and cannot predict their range.

Read More