2
$\begingroup$

I'm trying to convert all of my old Mathematica 7.0 codes to Mathematica 13.2, and I'm experiencing some unexpected issues. The following simple code draws a grayscale graphics:

intensity[x_] = (Sin[Pi x/8]/(2 Pi x/10) Cos[Pi x/5 + Pi/3])^2; graphic = DensityPlot[ intensity[x], {x, -3, 3}, {y, -1, 1}, ColorFunction -> GrayLevel, PlotPoints -> {1000, 3} ]; Show[graphic] 

Preview of what this code is doing:

Enter image description here

The issue is the pesky white vertical line in the middle. How can I get rid of it? Why is this simple code doing that, with Mathematica 13.2? I never had this, with version 7.0.

$\endgroup$

1 Answer 1

10
$\begingroup$

It's alerting you to the fact that your intensity function is only defined in terms of limits at x=0. If you add Exclusions -> None the white line will go away.

$\endgroup$
0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.