Heatmap aspect ratio

Oystein Bjorke vor 5 Jahren 0
This discussion was imported from CodePlex

asalx wrote at 2013-11-06 14:28:

I would like to fix the aspect ratio of a heat map based on the x- and y-axis spans, so that one unit of both axes is drawn the same length on the screen.

This is the same behaviour as the "axis equal" command in matlab.

So, if x-axis is [0, 1] and y-axis is [0, 2], the height of the plot would be twice the width.

I didn't find information on this topic in the examples. How could I handle this problem?

Thanks.

objo wrote at 2013-11-06 22:53:

I think this should be covered by setting PlotType = PlotType.Cartesian on the PlotModel.
But I would like to refactor this as described in https://oxyplot.codeplex.com/workitem/10095

asalx wrote at 2013-11-07 08:55:

Thank you. I did notice the PlotType.Cartesian examples in the example browser but I did not understand what it was actually doing.

It works for setting the X- And Y-axes to the same scale. However, I am working with a heatmap which has a ColorAxis, and this axis should not have the same scale as the other two.

I see how the refactoring you propose would be able to handle this. (This proposal seems more flexible, BTW.)

But, in the current implementation, is there a possibility to explicitly exclude the ColorAxis from the Cartesian type? (The default ColorAxis graduation is just fine.)

Thanks.

objo wrote at 2013-11-07 22:28:

I submitted a fix!

asalx wrote at 2013-11-08 16:31:

Thanks, works great!
CodePlex