I have a weird problem with DensityPlot
, ContourPlot
, and Plot3D
.
The function I want to plot is elementary:
DensityPlot[((-1 + 8 F^2 - 4 F Sqrt[-1 + 4 F^2]) R)/(8 F^2), {R, F} \[Element] Rectangle[{100, 1}, {1000, 5}]]
However, the result is a very jagged one. Same for ContourPlot
, and Plot3D
.
The way to get smooth plots is to specify the plot region not with Rectangle
but with the standard way, like {R, 100, 1000}, {F, 1, 5}.
DensityPlot[((-1 + 8 F^2 - 4 F Sqrt[-1 + 4 F^2]) R)/(8 F^2), {R, 100, 1000}, {F, 1, 5}]
This gives a smooth plot.
What's happening actually under the hood?
Is there any workaround for the problem when you don't have any other way to represent the plot region other than using some region objects, like Rectangle
, Disk
, Annulus
, etc?
Mathematica 13.2.1.0 on Windows11 (64bit)