2012-02-20 46 views
1

我可以使用gnuplot生成一個圖,如image(用dia繪製)中所示。具有插槽特定信息顯示的動態gnuplot

我正在接收3種類型的數據包,需要繪製它們的時間線。所有時隙以信標開始,其他兩個分組中的任何一個可能會到達給定時隙。

  1. 請提出我需要使用的命令集,如果是的話。
  2. 我可以從實際解碼數據包內容的(python)程序調用gnuplot,而不是寫入文件然後從中讀取數據。還是有更好的工具來繪製了很多插槽等動態內容,以便分析

回答

0
  1. 你可以利用boxxyerrorbars作爲證明here在部分Plot styles of combination of boxes and error bars。儘管鏈接的腳本使用Perl將其轉換爲python應該不會太難...

  2. 您可以使用Gnuplot.py在python中使用gnuplot繪製數據。

+0

進口從gnuplot的進口嚴格 * 圖表= Gnuplot.Gnuplot() g.hardcopy( 'plotStyle_10.ps',增強= 1,顏色= 1) g.title( '一個簡單的例子' )g.plot([[1,5],[2,4],[3,3],[4,2],[5,1],[6,0]])my @xerr =(0.5, 0.4,0.1,0,0.3,0.6); 我的$ boxerrorbars =圖:: gnuplot的:: DataSet->新( 外部數據=> [@x], YDATA => [@y],[@xerr], 風格=> 'boxerrorbars', title =>'boxerrorbars',); #step-2 $ chart-> plot2d($ boxerrorbars,$ boxxyerrorbars); #step-3 – 2012-02-22 22:02:39

+0

我無法運行Perl代碼,出現錯誤,無法找到圖表/ Gnuplot.pm我試圖學習一點perl並將代碼映射到python,可以幫助我使用步驟-2和步驟 - 3。我一直試圖編輯我的文章,但它說我沒有正確的張貼圖像。感謝 – 2012-02-22 22:09:16

+0

@mohdrafiq對不起,我沒有任何perl的經驗,特別是沒有與它的gnoplot庫。我很抱歉,我編輯了你的帖子,插入了一個圖像,使你無法編輯你的問題^^ – Woltan 2012-02-23 06:28:17