Skip to content

Allow user to select axises used for scale calculation for EqualScale mode#933

Merged
swharden merged 4 commits intoScottPlot:masterfrom
StendProg:AxisScaleLockCustomization
Apr 10, 2021
Merged

Allow user to select axises used for scale calculation for EqualScale mode#933
swharden merged 4 commits intoScottPlot:masterfrom
StendProg:AxisScaleLockCustomization

Conversation

@StendProg
Copy link
Contributor

@StendProg StendProg commented Mar 31, 2021

Purpose:
This PR allow user to customize behaviour of EqualAxisScale mode. Discussed in detail in #857.
By default behavior stay as before.
But Settings have 2 additional fields EqualScaleUseX = true and EqualScaleUseY=true.
If User disable one of them, then remain axis only used for EqualScale calculation.
This close to old behavior used in EqualScale on Control level.

New Functionality:

Plot.AxisScaleLock(true); // stay as it was

Plot.AxisScaleLock(true, false, true); // YAxisScale used for EqualAxisScale calculation, old `Control` behavior

swharden added 2 commits April 9, 2021 21:30
Settings.EnforceEqualAxisScales() now uses the EqualScaleMode enumeration to determine what behavior to use. Plot.AxisScaleLock() now lets the user pass-in this behavior as an optional argument.
@swharden swharden merged commit c434d78 into ScottPlot:master Apr 10, 2021
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.

Scaling is not restored under resizing in equal-scale mode

2 participants