旋轉曲面圖時字體顏色發生變化我使用最終篩選設計的預測公式產生了曲面圖。
我想在簡報中展示我的情節並旋轉情節。為此,我遵循了以下線程: https://community.jmp.com/t5/Discussions/Spinning-a-Scatterplot-3D/td-p/6510
這裡的建議最初是針對散點圖的,但是我使用同一行程式碼讓它工作:
Set Spin( 0.01, 0, 0.01, 0 )
旋轉工作正常,但是當情節旋轉時,字體顏色從黑色變為假灰色,使它們更難以閱讀:
Whilst spinning旋轉的同時
Whilst stationary靜止時
有人知道是什麼原因造成的/我可以做些什麼來解決這個問題嗎?或者也許有一種不同的方法可以使表面圖旋轉而不會導致此問題?
謝謝
數據探索和視覺化實驗設計回复:旋轉曲面圖時字體顏色會發生變化編寫振盪腳本以產生一個完整的周期。 cos() 函數獲得從 0 到 2*pi 的(幾乎)完整的輸入範圍,這使得從 +1 到 -1 的輸出範圍再次回到(幾乎)+1。 乘以 5 可產生 +/- 5 度的運動。 它完美地循環,因為最後一步之後的下一步是第一個圖像。 (如果使用 for-i 循環 <= 會有重複的幀。)for-n 循環不需要用於製作圖片,但對於現場演示很有用。
您可以製作一個翻轉演示而不是沒有餘弦函數的振盪演示。 振盪器使用每個初始 x、y、z 角度的相同增量。 只要在翻滾結束時所有角度都返回到相同的初始值,它就會很好地循環。 就像是
setrotation( 1*2*pi()*i,3*2*pi()*i,5*2*pi()*i) for 0<1
其中每個角度經過 1 個或多個完整的 2pi 旋轉(如圖所示為 1,3,5)。
我認為小範圍內的振盪更便於理解。 翻滾可能更好地吸引註意力。
Triple Helix spinning in 3DTriple Helix spinning in 3DTriple Helix spinning in 3D三螺旋 3D 旋轉

回复:旋轉曲面圖時字體顏色會發生變化它故意變暗以使文本不那麼分散注意力。 標記的軸已經在切換以避開圖形,並且在純黑色時很難觀察。 我不知道有什麼方法可以禁用該功能。 為了擴展 Phil 的建議,您可以編寫 Frame3D <@Anonymous
(或者,它足夠快,您可以只運行腳本而不捕獲圖像。)
dt = Open( "$SAMPLE_DATA/Tiretread.jmp" );
obj = Surface Plot(
Columns( :Pred Formula ABRASION ),
Control Panel( 0 ),
Surface Color Theme( "Green to Black to Red" ),
Surface Color Theme2( "Green to White to Red" ),
Surface Color Theme3( "White to Black" ),
Surface Color Theme4( "Blue to Gray to Red" ),
Response Column Color Theme( "Blue to Green to Red" ),
Response Column Color Theme2( "Blue to Gray to Orange" ),
Response Column Color Theme3( "Spectral" ),
Response Column Color Theme4( "Jet" ),
Formula( "Pred Formula ABRASION" ),
Surface Color Method( "Solid", "Solid", "Solid", "Solid" ),
SetVariableAxis( :SILICA, Axis Data( {} ) ),
SetVariableAxis( :SILANE, Axis Data( {} ) ),
SetZAxis( :Pred Formula ABRASION, Current Value( 125 ), Axis Data( {} ) ),
SetXVariable( :SILICA ),
SetYVariable( :SILANE ),
Iso Value( 0, 139.119238722664 ),
Frame3D(
Set Graph Size( 470, 470 ),
Set Grab Handles( 0 ),
Set Hide Lights Border( 1 ),
//Set Rotation( 10, 20, 30 )
)
);
//oscillate using cosine
ipic=0;
For( n = 1, n <= 3, n += 1,
For( i = 0, i < 1, i += 1 / 32,
delta = 5 * Cos( 2 * Pi() * i ); // 5 * (1..-1..1)
obj << frame3d( setrotation( 10 + delta, 20 + delta, 30 + delta ) );
obj << updatewindow;
Wait( 0 );
// take picture here if wanted
//img = report(obj)[SceneBox(1)]<<GETPICTURE></GETPICTURE>
oscillating 3D surfaceoscillating 3D surfaceoscillating 3D surface擺動的 3D 表面
我用 gifsicle 製作了動畫 gif;有很多方法可以將圖像序列轉換為動畫 gif 或視頻。
gifsicle -O3 -d 10 --loop=0 surf*.gif >osc.gif
回复:旋轉曲面圖時字體顏色會發生變化哇! 那是一個非常美麗的視覺效果!
當我使用 Set Spin() 時,我得到了相同的行為。 但不是當我使用單擊和拖動手動旋轉繪圖時。
我不確定是什麼原因造成的,或者是否有辦法解決它。 您可能需要聯繫技術支持( support@jmp.com )。 我在下面粘貼了一個示例腳本,該腳本演示了您正在談論的使用 Tiretread 示例數據的問題。
除此之外,您可以只屏幕記錄您手動旋轉的情節。
問候,
菲爾
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Tiretread.jmp" );
obj = Surface Plot(
Columns( :Pred Formula ABRASION ),
Control Panel( 0 ),
Surface Color Theme( "Green to Black to Red" ),
Surface Color Theme2( "Green to White to Red" ),
Surface Color Theme3( "White to Black" ),
Surface Color Theme4( "Blue to Gray to Red" ),
Response Column Color Theme( "Blue to Green to Red" ),
Response Column Color Theme2( "Blue to Gray to Orange" ),
Response Column Color Theme3( "Spectral" ),
Response Column Color Theme4( "Jet" ),
Formula( "Pred Formula ABRASION" ),
Surface Color Method( "Solid", "Solid", "Solid", "Solid" ),
SetVariableAxis( :SILICA, Axis Data( {} ) ),
SetVariableAxis( :SILANE, Axis Data( {} ) ),
SetZAxis( :Pred Formula ABRASION, Current Value( 125 ), Axis Data( {} ) ),
SetXVariable( :SILICA ),
SetYVariable( :SILANE ),
Iso Value( 0, 139.119238722664 ),
Frame3D(
Set Graph Size( 470, 470 ),
Set Grab Handles( 0 ),
Set Hide Lights Border( 1 ),
Set Rotation( -66.7809360215981, 3.32558351899253, 44.6221502352661 )
)
);
obj << Frame3D( Set Spin( 0.1, 0, 0.01, 0 ) );