我有一个数据,如点x,y,z列表。我添加了splines插值
f = Interpolation[{#[[1 ;; 2]], #[[3]]} & /@ data, Method -> "Spline"]
毕竟我试图绘制
`Show[Plot3D[f[x, y], {x, 10000, 10000000}, {y, 10, 50}, Mesh -> 15,
MeshFunctions -> {#3 &}, PlotRange -> {0, 0.0011},
PlotRangePadding -> {0.001, 0.0003}, PlotStyle -> Opacity[0.7],
ColorFunction -> "Rainbow",
AxesStyle -> {Black, Black, Black}],
Graphics3D[{Red, PointSize[.016], Point[data]}]]`
无法发布图片。
我使用这样的数据
data = {{10000, 10, 0.000000208191701}, {10000, 20, 0.000000416383402}, {10000, 30, 0.00000066886188}, {10000, 40,0.000000832854501}, {10000, 50, 0.000001040870809}, {100000, 10,0.000002081829313}, {100000, 20, 0.000004163483234}, {100000, 30,0.000006245400245}, {100000, 40, 0.000008327229558}, {100000, 50,0.000010409058871}, {1000000, 10, 0.000020818731618}, {1000000,20, 0.000041636761666}, {1000000, 30,
0.000062455405588}, {1000000, 40, 0.00008327361103}, {1000000, 50,
0.000104092254952},{10000000, 10, 0.000208475750285}, {10000000,
20, 0.000416951237469}, {10000000, 30,
0.000625426900044}, {10000000, 40, 0.000833902387228}, {10000000,
50, 0.001042377962108}}
我有一个问题,如何通过设置其他绘图步骤来拉动Z轴图形?
答案 0 :(得分:0)
我更改了默认的宽高比,并添加了z轴刻度值。
你可以简单地使用Ticks -> {Automatic, Automatic, {0, 0.0002, 0.0004, 0.0006, 0.0008, 0.001}}
,但我添加了一些格式。 FindDivisions
对于不太直接的案例非常有用。
Show[Plot3D[f[x, y], {x, 10000, 10000000}, {y, 10, 50}, Mesh -> 15,
MeshFunctions -> {#3 &}, PlotRange -> {0, 0.0011},
PlotRangePadding -> {0.001, 0.0003}, PlotStyle -> Opacity[0.7],
ColorFunction -> "Rainbow", AxesStyle -> {Black, Black, Black},
Ticks -> {Automatic, Automatic,
{#, NumberForm[#, {3, 4}]} & /@ N@FindDivisions[{0, 0.001}, 5]},
AspectRatio -> 1, ImageSize -> 300],
Graphics3D[{Red, PointSize[.016], Point[data]}]]
修改强>
添加子标记: -
Show[Plot3D[f[x, y], {x, 10000, 10000000}, {y, 10, 50}, Mesh -> 15,
MeshFunctions -> {#3 &}, PlotRange -> {0, 0.0011},
PlotRangePadding -> {0.001, 0.0003}, PlotStyle -> Opacity[0.7],
ColorFunction -> "Rainbow", AxesStyle -> {Black, Black, Black},
Ticks -> {Automatic, Automatic,
DeleteCases[
Flatten[{{#1, NumberForm[#1, {3, 4}]}, {#2, ""}, {#3, ""}, {#4, ""}} & @@@
Partition[N@FindDivisions[{0, 0.001}, 20], 4, 4, {1, 1}, Null], 1],
{Null, _}]},
AspectRatio -> 1, ImageSize -> 300],
Graphics3D[{Red, PointSize[.016], Point[data]}]]
添加箱子比率
Show[Plot3D[f[x, y], {x, 10000, 10000000}, {y, 10, 50}, Mesh -> 15,
MeshFunctions -> {#3 &}, PlotRange -> {0, 0.0011},
PlotRangePadding -> {0.001, 0.0003}, PlotStyle -> Opacity[0.7],
ColorFunction -> "Rainbow", AxesStyle -> {Black, Black, Black},
Ticks -> {Automatic, Automatic,
DeleteCases[
Flatten[{{#1, NumberForm[#1, {3, 4}]}, {#2, ""}, {#3, ""}, {#4, ""}} & @@@
Partition[N@FindDivisions[{0, 0.001}, 20], 4, 4, {1, 1}, Null], 1],
{Null, _}]}, AspectRatio -> 1, ImageSize -> 1200],
Graphics3D[{Red, PointSize[.016], Point[data]}],
BoxRatios -> {1, 1, 3},
BaseStyle -> FontSize -> 36]