level 3
zjnone
楼主
怎么在绘制等高线图的时候让等高线在标签处断开,像下图这样
ContourPlot[Cos[\[Pi]/4 (x + 1)] Cos[\[Pi] y], {x, -1, 1}, {y, -1, 1},
ColorFunction -> (Transparent &),
ContourLabels -> (Text[
#3, {#
1, #2}, Background -> White] &)
]

但是不会像下面这样盖住绘制的颜色?
ContourPlot[Cos[\[Pi]/4 (x + 1)] Cos[\[Pi] y], {x, -1, 1}, {y, -1, 1},
ColorFunction -> "SunsetColors",
ContourLabels -> (Text[
#3, {#
1, #2}, Background -> White] &)
]

2021年03月30日 10点03分
1
ContourPlot[Cos[\[Pi]/4 (x + 1)] Cos[\[Pi] y], {x, -1, 1}, {y, -1, 1},
ColorFunction -> (Transparent &),
ContourLabels -> (Text[
#3, {#
1, #2}, Background -> White] &)
]

但是不会像下面这样盖住绘制的颜色?ContourPlot[Cos[\[Pi]/4 (x + 1)] Cos[\[Pi] y], {x, -1, 1}, {y, -1, 1},
ColorFunction -> "SunsetColors",
ContourLabels -> (Text[
#3, {#
1, #2}, Background -> White] &)
]
