问题
I have been tying to set the min and max values of y axis by using properties like ActualMinimum
and ActualMaximum
,but i doesn't work even I set the MinimumPadding
and MaximumPadding
to 0. I also tried the Zoom method of axis, it did not work. Sorry that I cannot upload a pic...
Could someone please guide me in this regard ? Any help is very much appreciated. Thanks !
回答1:
Please use the properties AbsoluteMaximum
and AbsoluteMinimum
to limit the axes to a specific value:
plotModel.Axes.Add(new LinearAxis
{
Position = AxisPosition.Left,
AbsoluteMaximum = 5.5,
AbsoluteMinimum = 0,
});
In my opinion the properties ActualMinimum
and ActualMaximum
are used to limit the axes to an initial value but you are able to zoom out later.
来源:https://stackoverflow.com/questions/31430752/oxyplotcannot-setting-axis-values