Stats

Popular Posts

Followers

Mathematica 教學 GridLines消失

戴忠淵 於 2012年8月24日星期五 下午4:14 發表
請教各位大大  有個例子如下  A = LogLogPlot[x^3 + 3*x^2, {x, 1, 1000}, Frame -> True,   GridLines -> Automatic]  B = LogLogPlot[2*x^3 + 2*x^2, {x, 1, 1000}, Frame -> True,    GridLines -> Automatic]  此時圖A與圖B畫出來是有GridLines  但我想把兩張圖整合成一張,所以使用了以下這個指令  Show[{A, B}, Frame -> True, GridLines -> Automatic]  此時雖然兩張圖會合成一張,但GridLines就消失了  想請問各位大大要如何解決此問題呢? 感謝解感

如果知道Mathematica輸出的資料結構,那就很容易了。
A=LogLogPlot[x^3+3*x^2,{x,1,1000},Frame->True,GridLines->Automatic];
B=LogLogPlot[2*x^3+2*x^2,{x,1,1000},Frame->True,GridLines->Automatic];

(* A[[2]]包含了A所有圖形屬性的設定,利用Rule的方式取出格線屬性。GridLines/.A[[2]]  *)

Show[{A,B},Frame->True,GridLines->(GridLines/.A[[2]])]


Tags: , ,

讀者回應 ( 0 意見 )

發佈留言

Please leave your name and tell me what you thought about this site. Comments, suggestions and views are welcomed.

如果這篇文章對你有幫助,那請留個訊息給我~