# Limit Relief plot output to specified X and y range

I have a table of values and I'd like to use ReliefPlot to visualise. Is it possible through the plot command to limit the $x,y$ range displayed?

The help suggests PlotRange->{{1, 5}, {1, 10}} should do this, but this appears to limit the $z$ output not $x,y$.

I know I can pull out bits of the table, create a new one, then plot that, but this is rather inefficient when exploring the output.

• Try PlotRange->{{1,5},{1,10}, Full} – Edmund May 8 '16 at 12:57
• I agree that something looks strange in the ReliefPlot documentation. The example that says "Use an explicit x range and y range to focus on areas of interest" with PlotRange -> {{100, 200}, {200, 300}}looks identical to the preceeding one with PlotRange->Automatic....Could this be a bug? – Rashid May 9 '16 at 4:29
• Thanks for the suggestion @Edmund, however for me that isn't limiting the x/y range. – Esme_ May 10 '16 at 5:20
• @Rashid I suspect it is a bug if I'm not misunderstanding what's said there. – Esme_ May 10 '16 at 5:21
• Esme, @Edmund I agree with you both that something fishy is going on here. Esme may have been missing a DataRange directive, nonetheless the documentation explicitly mentions that PlotRange should interact with the DataRange, but it doesn't in MMA 10.4.0 (Win7-64). It is funny to see that the online docs also show an incorrect output for that particular case. – MarcoB May 10 '16 at 16:25

I think you stumbled upon a bug in ReliefPlot.

data = Table[Sin[x] Cos[2 y] + 0.1 x, {x, -10, 10, 0.05}, {y, -10, 10, 0.05}];

ReliefPlot[data,
DataRange -> {{-10, 10}, {-10, 10}},
PlotRange -> {{-5, 5}, {-8, 5}, All},
AspectRatio -> 1, Frame -> True, FrameTicks -> True
]


According to the documentation for v. 10.4, PlotRange should "interact with DataRange", which I take to mean that one can specify a plot range using the transformed coordinated generated by the data range, rather than the row/column numbers when an explicit DataRange directive is provided.

In fact, however, this doesn't happen, as shown above. The documentation also contains seemingly contradictory results:

Although from the description one would expect the plot range of the resulting plot to be restricted, it actually isn't.