# Contour lines in ListContourPlot with InterpolationOrder 0

I have a dataset and would not want Mathematica to interpolate at all while plotting the contours. This is because the data contains essential binning information and the "steps" in the contour must convey that sense. Interpolating on the data to "smoothen" the contours would make the plot lose its physical validity altogether. Apparently, ListContourPlot doesn't show the contour lines at all when InterpolationOrder is set to 0.

ListContourPlot[data, ScalingFunctions -> {"Log", "Log", "Log"},
InterpolationOrder -> 0, Contours -> {Log[3]},
GridLines -> {{0.001, 0.01, 0.1, 1}, {5*10^-4, 10^-3, 2*10^-3, 5*10^-3}},
ContourStyle -> {Thick,  Black}]


With just the InterpolationOrder commented out the contour lines do appear.

 ListContourPlot[data, ScalingFunctions -> {"Log", "Log", "Log"},
(*InterpolationOrder -> 0,*) Contours -> {Log[3]},
GridLines -> {{0.001, 0.01, 0.1, 1}, {5*10^-4, 10^-3, 2*10^-3, 5*10^-3}},
ContourStyle -> {Thick,  Black}]


What I want is that neither of the regions be shaded but the contour line appear. Which I believed I should get with the code,

ListContourPlot[data, ScalingFunctions -> {"Log", "Log", "Log"},
InterpolationOrder -> 0, Contours -> {Log[3]},
GridLines -> {{0.001, 0.01, 0.1, 1}, {5*10^-4, 10^-3, 2*10^-3, 5*10^-3}},
ContourStyle -> {Thick,  Black}]


But this gives me just nothing. A blank plot.

A sample dataset may be obtained using,

 data = List[{10^-4, 10^-3, Abs[-0.5*Log[10^-4/10^-3]]}];
Do[
Do[
test = Abs[-0.5*Log[i/j]];
data = Join[data, List[{i, j, test}]],
{i, 10^-4, 10^-2, 10^-3}],
{j, 10^-3, 6, 10^-1}];


Update:

@kglr it doesn't work. With the sample data, what I would require is the line between the two regions in

What I get using

if=Interpolation[DeleteDuplicates@data, InterpolationOrder->0]; Quiet@ContourPlot[if[x,y],{x,0,1},{y,0,6},ScalingFunctions->{"Log","Log","Log"}, Contours->{{Log[3]}}, ContourStyle->Directive[Thick, Black],ContourShading->None]


is

Even the scales don't match up somehow.

• Can you please provide a minimal representative data? – rhermans Jul 25 '18 at 7:29
• Right, dataset to play with would be great. Sound as if something like ArrayMesh[ UnitStep[threshold - data]] could be useful here. – Henrik Schumacher Jul 25 '18 at 7:49
• is this close to what you need: if=Interpolation[DeleteDuplicates@data, InterpolationOrder->0]; Quiet@ContourPlot[if[x,y],{x,0,1},{y,0,6},ScalingFunctions->{"Log","Log","Log"}, Contours->{{Log[2]}}, ContourStyle->Directive[Thick, Black],ContourShading->None]? – kglr Jul 25 '18 at 13:44