Skip to content

tiny-plot: sanity improvements in scatter plot tick labels#269

Merged
taimontgomery merged 4 commits intomasterfrom
issue-265
Dec 23, 2022
Merged

tiny-plot: sanity improvements in scatter plot tick labels#269
taimontgomery merged 4 commits intomasterfrom
issue-265

Conversation

@AlexTate
Copy link
Member

@AlexTate AlexTate commented Dec 23, 2022

The routine for placing scatter plot tick labels is now more robust when the plotted range is very small or very large. "Every other n" label placement now adjusts to the plot window rather than being a fixed n = 3. Labels are no longer suppressed at the origin; this was originally done when we were using exponent labels which are much wider. Labels at the upper end of the axis are placed more liberally. All in all, these changes produce tick labels with more comfortable density under a wider range of plot window sizes.

This is demonstrated in the animation below, which uses a rolling expanding window:
sane_ticks_2_small

Closes #265

…ainly, this entails:

1. A flexible n in "every nth label" that scales with the axis range rather than being a constant value
2. The function that performs the initial calculation of major tick locations no longer places ticks outside of the plot's view limits as it had under certain conditions

Additionally, the lowermost tick mark/label is no longer hidden by default, and the uppermost tick mark/label is no longer hidden if it is too close to the end of the axis. These measures were originally implemented when we were using exponent tick labels which are much wider, and aren't necessary with the shorter log2 labels.
…w for a mock scatter plot while saving each "frame". This is disabled by default because it takes a little while to run and produces many files
… which was added for testing purposes. It isn't a user-facing value so the default case should assume that it is not set.
@taimontgomery
Copy link
Collaborator

Tested successfully with ram1 and Lib303 datasets.

@taimontgomery taimontgomery merged commit eb18aad into master Dec 23, 2022
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.

tiny-plot: improve tick labels in scatter plots that occupy very small or very large ranges

2 participants