Skip to content

Conversation

@Matrx007
Copy link

@Matrx007 Matrx007 commented Aug 10, 2022

Implementing x-axis units. This PR also solves issue (feature-request) #13.

Description:
The new 'unit' property determines the unit of x-axis values. The distance between the tick marks is divided by this number. Settings this to 0 will work as if it was set to 1, to avoid division by 0. Negative numbers are allowed.

For example, setting this and x_ticks_major to 60 will display x-axis ticks in minutes (by dividing major ticks by 60), assuming that data rate is once per second.

Use case:
At the moment, when data is fed into a graph 20 times per second, the best way to make it readable is to set x_ticks_major to 20, so that every vertical grid line represents one second. The x-axis labels are multiples of 20 though, which is confusing to end-users.

Settings the new 'unit' property to 20 in that case will divide the x-axis labels by 20, therefore making it more understandable to the end-user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant