2

How do you make a heatmap with square axis (equal length axis)? When I use the following I get a square image but the x-axis span is (-1.8, 1.8) instead of (-1,1)

PlotModel = new PlotModel { Title = "Heatmap Example" };
PlotModel.PlotType = PlotType.Cartesian;
PlotModel.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom, Minimum = -1, Maximum = 1, Title = "U", MajorStep = 0.2 });
PlotModel.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Minimum = -1, Maximum = 1, Title = "V", MajorStep = 0.2 });

When I set an AbsoluteMinimum and AbsoluteMaximum the image stretches the aspect ratio.

user3396724
  • 33
  • 1
  • 4
  • Have you seen the examples here: http://docs.oxyplot.org/en/latest/models/series/HeatMapSeries.html? They are using a LinearColorAxis, not a LinearAxis. – Palle Due May 31 '17 at 11:49
  • 1
    Did you found an answer to your Q? – FoggyFinder Jun 13 '17 at 05:13
  • I have not found a solution to the problem associated with producing a heatmap with square axis (i.e. equal axis length) – user3396724 Sep 16 '17 at 12:08
  • @user3396724 you may want to look at a solution I found for this: https://stackoverflow.com/questions/45513600/how-to-create-square-plot-area-with-oxyplot – gleng Nov 13 '17 at 13:28
  • Docs link is now https://oxyplot.readthedocs.io/en/latest/models/series/HeatMapSeries.html – Richard Aug 24 '19 at 15:20

0 Answers0