2014-04-19 193 views
0

我有一個數據,如點x,y,z的列表。我加插值通過花作爲 f = Interpolation[{#[[1 ;; 2]], #[[3]]} & /@ data, Method -> "Spline"] 而且畢竟我嘗試繪圖如何在Wolfram Mathematica中設置繪製座標軸中的一個的步驟

`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

我添加了基準問題。 – yavalvas

回答

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}]} & /@ [email protected][{0, 0.001}, 5]}, 
    AspectRatio -> 1, ImageSize -> 300], 
Graphics3D[{Red, PointSize[.016], Point[data]}]] 

enter image description here

編輯

添加子蜱: -

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[[email protected][{0, 0.001}, 20], 4, 4, {1, 1}, Null], 1], 
    {Null, _}]}, 
    AspectRatio -> 1, ImageSize -> 300], 
Graphics3D[{Red, PointSize[.016], Point[data]}]] 

enter image description here

添加盒比率

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[[email protected][{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] 

enter image description here

+0

非常感謝。它看起來更好,但我的意思是,我需要通過設置每個步驟的視覺長度來拉動這個區域..例如,在值0.0002,0.0004,0.0006(z軸)之間,我需要更多的像素和它會拉我的圖。 – yavalvas

+0

@yavalas - 我猜你的意思是添加子滴答。 –

+0

不,我猜測,我需要更多的像素之間的每個滴答(例如值0.0002,0.0004,0.0006之間)。之後,我的圖表會變得更大。 – yavalvas

相關問題