Same scale for two axes

Jun 5, 2012 at 10:49 PM
Edited Jun 5, 2012 at 11:03 PM

dear friends,

i would like to keep the two axes at the identical scale without changing the plot content. For example: I want to plot two points (1,1) and (3,3). but the width:height of the plot control is 4:3. I want to make the plot area as a square to suit the box. i am thinking to shrink the width of the plot area. Or manipulate the axes? or any other ideas? which method is it possible to achieve this? 


Thank you in advance for your help!


Jun 19, 2012 at 11:41 AM

If whitespace on the sides of the plot is ok: I think you could change the PlotMargins of the PlotModel when the size of the plot control changes.

Otherwise you could change the Minimum/Maximum of one the axes, based on the ActualMaximum/ActualMinimum of the other axis.

Aug 18, 2012 at 1:34 AM

Thanks alot for the reply objo. I prefer to manipulate the axes. but the Minimum/Maximum seems to be ineffective after I drag the plot, no matter using the method




now I manually compare the scales on X and Y axes and change the ActualMaximum/ActualMinimum of one of the axes before plotting. but because I need to plot some spatial features to be shown as a map. i need to keep the same scale all the time. I am struggling to keep the same scale on both axes when doing zooming. Do you have any suggestions?

Is it possible to implement a property setting the axes at same scale in the future. Thank you very much.

Aug 21, 2012 at 12:20 PM

PlotModel.PlotType = PlotType.Cartesian was intended to force axes to use the same scaling, can this be used?

Aug 21, 2012 at 10:40 PM

Works great! Thanks a lot for this amazing tool!

Oct 3, 2012 at 7:41 AM
Edited Oct 3, 2012 at 7:42 AM

Hello Luckymichael,

I have same problem, I want my plot as square as both axes are showing same scale.

Would you please share your steps or code with us?

Thanks in advanced.

Oct 3, 2012 at 9:00 AM

i just do what objo suggest in his post