Suppose I am plotting some two-dimensional function, using DensityPlot
, and that I would like to add the outer line of a circle to this figure. I found one way to do it:
pt1 = DensityPlot[x y, {x, -5, 5}, {y, -5, 5}];
pt2 = RegionPlot[x^2 + y^2 < 1, {x, -5, 5}, {y, -5, 5},
BoundaryStyle -> Black, PlotStyle -> White];
Show[pt1, pt2]
However, 1) I suspect that this can be done in an easier way; 2) The inner part of the circle is white now, whereas I would like to so the function value of the first figure in the center. Any ideas on how to do this?
EDIT: more generally, I would like to plot a function which can become zero, e.g. sin[x]sin[y]
using DensityPlot
and then plot a black line connecting all the points where this is zero. Any thoughts on how to do this?