
我想使用 CSV 檔案中的資料在 PGF/TikZ 中繪製圖表。以下是 CSV 檔案的連結: https://www.dropbox.com/scl/fi/3be8309dhs4yspji25zrl/plot3_detailed_ground_shear_Pressure.csv?rlkey=npbbqk3t0tfx8frvk5er5ea50&dl=0
我嘗試使用以下 TikZ/PGFPlots 程式碼建立繪圖,但遇到了一些問題。這是我的第三個圖的程式碼範例,「詳細的地面剪切壓力:
\begin{polaraxis}[
title={Detailed Ground Shear Pressure},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
]
\pgfplotstableread[col sep=comma]{plot3_transformed_detailed_ground_shear_pressure.csv}\datatable
\addplot+[no markers] table[x=data_phi_deg, y=Gs] from \datatable;
\addlegendentry{Transformed Gs}
\addplot+[no markers, fill=red, fill opacity=0.3] table[x=data_phi_deg, y expr=\thisrow{Gs}*\thisrow{exceed_mask}] from \datatable;
\addlegendentry{Critical Regions where Gs > Gp}
\addplot+[no markers, fill=orange, fill opacity=0.3] table[x=data_phi_deg, y expr=\thisrow{Gs}*\thisrow{below_mask}] from \datatable;
\addlegendentry{Critical Regions where Gs < -Gp}
\end{polaraxis}
\end{tikzpicture}
任何人都可以提供有關如何使用提供的 CSV 文件中的數據在 PGF/TikZ 中正確繪製這些圖表的指導或建議嗎?我正在尋求關於在 PGF/TikZ 中追求這一點是否合理的建議,或者考慮到我已經在 Python 中生成了這些圖,那麼堅持使用 Python 是否會更好。然而,為了保持文章的一致性,我更願意使用 PGF/TikZ 來搭配我其他圖的風格。任何見解或建議將不勝感激。