Skip to content

Scaling is not restored under resizing in equal-scale mode  #857

@dawn0us

Description

@dawn0us

ScottPlot 4.1.09-beta

In order to display some tool path data in an intuitive way, I try to maintain equal scaling of axes of a WpfPlot by calling Plot.AxisScaleLock(). It turns out that although the scaling is equal under several resizing operations, the shared scaling could not be restored when the plot was restored to some previous size after downsizing, which leaves the object in a smaller state.
equal-scale issue
The above gif was recorded with Polar axis demo of WPF demo 4.0.22 and the same can be observed with the one of 4.1.09-beta.
The reason that I tested with 4.0.22 is that the scaling change shown in #272 does look as expected, which I believe introduced this mode originally. In fact, in the same WPF demo 4.0.22, the WpfConfig demo works in a more natural way and is shown in the following two gifs (as the behavior is different for x and y resizing).

equal scale issue _3 equal scale issue _4

It seems that two demos use different implementations of equal-scale mode. WpfConfig demo uses the previous implementation Plot.AxisEqual() where scaling (UnitsPerPixel) of y is applied to both axes. And Polar axis demo uses the newer implementation Plot.EqualAxis which adopts the larger one, a strategy inherited by the current implementation Plot.AxisScaleLock().
So is it possible to have the option of maintaining equal scale in the old way? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions