gonum / gonum/plot

plot: extending the Ticker interface

Open
#581 29 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

Have you thought about extending the Ticker interface so that the font size and graphic width can be accessed? It seems a bit strange to me to create markers if you don't know the font size and how much space is available.

In my experience, you often want to have as many tick marks as possible as long as you can still read the labels, which means that they must not overlap.
To create such tick marks, however, you need to have access to the font size and the graphic size.

I have implemented this as an [example](https://github.com/hneemann/plot/blob/71d6dc929f42a6f68af153cfb6cb9eb84f08a1c0/axis.go#L16) to meet my requirements. Maybe this or a similar extension should be integrated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.