如何將圖表的背景設定為多重的顏色?
主要軟體:
主要軟體版本: N/A
主要軟體修正版本: N/A
次要軟體:
問題: 我想在圖表中設定多重的背景顏色,讓我感興趣的區域(ROI)可以用不同的顏色顯示。例如,某個Y值以上是一種顏色,某個Y值以下是另一種,而中間(ROI)又是另一種。
解答: 多增加一些plot,然後用不同的顏色將這些增加plot填滿,有兩種方法:
- 從人機介面區 (參考附加檔案)
- 展開Plot Legend,來增加plot
- 按右鍵,選 Plot1 >>選"Fill Base Line" >> 選'Infinity'. 這會使得整個圖表在plot之上的區域都填滿plot1的顏色. 可以用這條plot作為上限
- 按右鍵選Plot2 >>選Fill Base Line >> 選'-Infinity'. 這會使得整個圖表在plot2之下的區域都填滿plot2的顏色. 可以用這條plot作為下限
- 用 'Build Array' 結合這些資料, Plot0是實際的資料, Plot1作為上限, Plot2 作為下限。
- 用程式控制
可以使用下列 property nodes:
- 選Active Plot (ActPlot) -設定有效的 plot 是哪一個(第一個 plot 為 0).
- 再選 Plot Fill/Point Color (Plot.Fill/PtColor) - 設定要填滿顏色
- 選Plot Fill to (Plot.FillTo) - 填滿底線
附記: 請記得在設定 'Fill/Point Color' 和 'Fill To' properties之前,先設定 active plot。
相關連結:
附加檔案: - graph background plot fp.vi
報告日期: 02/06/2004
最後更新: 03/03/2004
文件偏號: 365I02YU
Other Support Options
Ask the NI Community
Collaborate with other users in our discussion forums
Request Support from an Engineer
A valid service agreement may be required, and support options vary by country.