Profile control - Added zMaxChars option that defines the maximum num… #749
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the z label is too large, it is partly written under the axis label or even outside of the canvas, see issue #748.
The proposed change considers adding a
zMaxChars
option that defines the maximum number of chars to be used for z graduation label before switching to scientific notation.When the width of the largest label is larger than the
zMaxChars
limit, then, the whole axis switches to scientific notation with a single exponent deduced from the largest absolute value to be labelled.The base numbers are then is displayed at a precision using maximum available characters defined by
zMaxChars
, including the decimal point and sign.The proposed changes do not affect the default behaviour (i.e. no change if zMaxChars option is not provided), except a small increase of left margin that you may choose to ignore.
See a few examples for different orders of magnitude and
zMaxChars=5
: