Some material I read gives a really good contour plot (img1), but when I use the same math to analyze some other sets of data, and make the contour plot with MMA, it gives some ladder-like distribution (img2). Can I narrow them and make it smoother?
By smoother, I mean the color of model contour plot is blending from red to blue, and every stage of them is not that significant (they are more like a blend of two similar color), but in my plot the neighbor stage just jump to another color, like from blue to green, which makes it quite rigid. And the plot legend is different, so I wonder maybe I can make the plot range smaller to the concentrate part and narrow the difference between neighbor color?
(Btw, I tried plotrange->All, but things doesn’t go well(img3))
The code is as followed:
chi2Dis=0.542819 (-0.237992 + (1. (x^2 + y^2)^0.28 (1 +
1/40 Sqrt[
x^2 + y^2])^2.66)/((142.325 + (6367.9 - x)^2 + (-93. -
y)^2 - 23.86 Sqrt[(6367.9 - x)^2 + (-93. - y)^2]
Cos[0.174048 - (Sqrt[x^2 + y^2] (0.015 + ArcTan[y/x]))/
Sqrt[(6367.9 - x)^2 + (-93. - y)^2]])^0.56 (1 +
1/40 (142.325 + (6367.9 - x)^2 + (-93. - y)^2 -
23.86 Sqrt[(6367.9 - x)^2 + (-93. - y)^2]
Cos[0.174048 - (Sqrt[x^2 + y^2] (0.015 + ArcTan[y/x]))/
Sqrt[(6367.9 - x)^2 + (-93. - y)^2]]))^2.66))^2 +
0.542819 (-0.920296 + (1. (x^2 + y^2)^0.28 (1 +
1/40 Sqrt[
x^2 + y^2])^2.66)/((30.1401 + (6367.9 - x)^2 + (-93. -
y)^2 - 10.98 Sqrt[(6367.9 - x)^2 + (-93. - y)^2]
Cos[1.16923 - (Sqrt[x^2 + y^2] (0.015 + ArcTan[y/x]))/
Sqrt[(6367.9 - x)^2 + (-93. - y)^2]])^0.56 (1 +
1/40 (30.1401 + (6367.9 - x)^2 + (-93. - y)^2 -
10.98 Sqrt[(6367.9 - x)^2 + (-93. - y)^2]
Cos[1.16923 - (Sqrt[x^2 + y^2] (0.015 + ArcTan[y/x]))/
Sqrt[(6367.9 - x)^2 + (-93. - y)^2]]))^2.66))^2 +
0.542819 (-2.61093 + (1. (x^2 + y^2)^0.28 (1 +
1/40 Sqrt[
x^2 + y^2])^2.66)/((42.6409 + (6367.9 - x)^2 + (-93. -
y)^2 - 13.06 Sqrt[(6367.9 - x)^2 + (-93. - y)^2]
Cos[1.32055 - (Sqrt[x^2 + y^2] (0.015 + ArcTan[y/x]))/
Sqrt[(6367.9 - x)^2 + (-93. - y)^2]])^0.56 (1 +
1/40 (42.6409 + (6367.9 - x)^2 + (-93. - y)^2 -
13.06 Sqrt[(6367.9 - x)^2 + (-93. - y)^2]
Cos[1.32055 - (Sqrt[x^2 + y^2] (0.015 + ArcTan[y/x]))/
Sqrt[(6367.9 - x)^2 + (-93. - y)^2]]))^2.66))^2 +
0.542819 (-3.59972 + (1. (x^2 + y^2)^0.28 (1 +
1/40 Sqrt[
x^2 + y^2])^2.66)/((28.9444 + (6367.9 - x)^2 + (-93. -
y)^2 - 10.76 Sqrt[(6367.9 - x)^2 + (-93. - y)^2]
Cos[2.77748 + (Sqrt[x^2 + y^2] (0.015 + ArcTan[y/x]))/
Sqrt[(6367.9 - x)^2 + (-93. - y)^2]])^0.56 (1 +
1/40 (28.9444 + (6367.9 - x)^2 + (-93. - y)^2 -
10.76 Sqrt[(6367.9 - x)^2 + (-93. - y)^2]
Cos[2.77748 + (Sqrt[x^2 + y^2] (0.015 + ArcTan[y/x]))/
Sqrt[(6367.9 - x)^2 + (-93. - y)^2]]))^2.66))^2;
ContourPlot[chi2Dis,{x,-15000,25000},{y,-10000,10000},
ColorFunction->”Rainbow”,PlotLegends->Autotmatic]
PlotPoints
option. Maybe tryPlotPoints -> 100
. (And using @Johu 's suggestion ofPlotRange -> All
is essential to remove the "white" area.) Also, to get the contour plot to look more like the first two examples you should usePlotRangeClipping -> True
. That will remove the white space near the axes. $\endgroup$chi2Dis /. {x -> 1, y -> 1}
andchi2Dis /. {x -> 5000, y -> 5000}
, one gets 11.2247 for both. And the same for pretty much any{x,y}
values (except{x -> 0, y -> 0}
as that gives an error. $\endgroup$