-
Notifications
You must be signed in to change notification settings - Fork 979
Combining Heatmaps and ScatterSeries does not work. #1093
Description
Steps to reproduce
- Create a plot with a DateTimeAxis on X-axis. LinearAxis on Y-axis.
- Add a LinearColorAxis (for heatmap)
- ScatterSeries added no longer show up on the plot.
Platform:
.NET version: 4.5.2
OxyPlot Version: 1.0.0.0
Actual behaviour
The following is what my plot looks like with everything except for the HeatMapSeries and the accompanying LinearColorAxis to show the Heatmap (i.e. just ScatterSeries and LineSeries):

So far so good.
Now I add in a LinearColorAxis -- without any Heatmap data yet and I get the following:

As you can see the ScatterSeries have disappeared for some reason. All the points are still there (I can use the tracker to see that they still exist) and HitTestResults work as expected --- they just don't show. The LineSeries that connects the points on the ScatterSeries does still show though.
Actually adding the heatmap data does show the heatmap data, but the ScatterSeries are still missing. I've tried adding Axis Keys and assigning them to Series as appropriate but still no dice.
The following is my code for the Axes:
var xAxis = new DateTimeAxis();
xAxis.Key = "X";
xAxis.Position = AxisPosition.Bottom;
xAxis.AbsoluteMinimum = DateTimeAxis.ToDouble(CurrentPass.AOS);
xAxis.AbsoluteMaximum = DateTimeAxis.ToDouble(CurrentPass.LOS);
xAxis.AxislineColor = xAxis.TextColor = xAxis.TicklineColor = xAxis.MajorGridlineColor = OxyColors.DarkGray;
var yAxis = new LinearAxis();
yAxis.Key = "Y";
yAxis.Position = AxisPosition.Left;
yAxis.AbsoluteMinimum = 0.0;
yAxis.AbsoluteMaximum = MaximumFrequency;
yAxis.Maximum = MaximumFrequency;
yAxis.AxislineColor = yAxis.TextColor = yAxis.TicklineColor = yAxis.MajorGridlineColor = OxyColors.DarkGray;
var heatmapAxis = new LinearColorAxis();
heatmapAxis.AbsoluteMinimum = 0.0;
heatmapAxis.AbsoluteMaximum = MaximumFrequency;
heatmapAxis.Palette = OxyPalettes.Gray(1024);
heatmapAxis.Key = "HeatMap";
LEOPassModel.Axes.Add(xAxis);
LEOPassModel.Axes.Add(yAxis);
LEOPassModel.Axes.Add(heatmapAxis);
Expected behaviour
The ScatterSeries should show as in the first picture but with the heatmap behind.