Skip to content

Combining Heatmaps and ScatterSeries does not work. #1093

@lostinspacebar

Description

@lostinspacebar

Steps to reproduce

  1. Create a plot with a DateTimeAxis on X-axis. LinearAxis on Y-axis.
  2. Add a LinearColorAxis (for heatmap)
  3. 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):
image

So far so good.

Now I add in a LinearColorAxis -- without any Heatmap data yet and I get the following:
image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions