|
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: GMT 教學手冊 1.2\n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | | -"POT-Creation-Date: 2021-02-23 11:56-0500\n" |
| 11 | +"POT-Creation-Date: 2021-03-18 14:30-0400\n" |
12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -494,17 +494,64 @@ msgid "觀看\\ `最終版圖片`_" |
494 | 494 | msgstr "" |
495 | 495 |
|
496 | 496 | #: ../../SOURCE_DOCS/scatter_plot.rst:396 |
| 497 | +msgid "PyGMT 指令稿" |
| 498 | +msgstr "" |
| 499 | + |
| 500 | +#: ../../SOURCE_DOCS/scatter_plot.rst:398 |
| 501 | +msgid "使用 PyGMT,可以如下腳本繪製本地圖:" |
| 502 | +msgstr "" |
| 503 | + |
| 504 | +#: ../../SOURCE_DOCS/scatter_plot.rst:400 |
| 505 | +msgid "import pygmt\n" |
| 506 | +"import numpy as np\n" |
| 507 | +"# 需要 Numpy 來讀取檔案中的資料\n" |
| 508 | +"\n" |
| 509 | +"# ==== 設定變數 ====\n" |
| 510 | +"# 我們使用 numpy.loadtxt 載入資料表,然後資料點樣式使用 Python 的 Dictionary 來指定。\n" |
| 511 | +"zzh = np.loadtxt('zzh.txt', delimiter=',')\n" |
| 512 | +"suao = np.loadtxt('suao.txt', delimiter=',')\n" |
| 513 | +"zzh_style = {'style': 'c0.35c', 'color': '#58C73A', 'pen': '0.03c,black'}\n" |
| 514 | +"suao_style = {'style': 'd0.35c', 'color': '#3A6BC7', 'pen': '0.03c,black'}\n" |
| 515 | +"\n" |
| 516 | +"fig = pygmt.Figure()\n" |
| 517 | +"\n" |
| 518 | +"# ==== 版面與作圖區設定 ====\n" |
| 519 | +"fig.basemap(region=[-1, 23, 0, 7], projection='X15c/10c', frame=['WSne+t\"January 2016\"', 'xaf+l\"Temperature (@.C)\"', 'ya2f+l\"Wind Speed (m s@+-1@+)\"'])\n" |
| 520 | +"\n" |
| 521 | +"# ==== 繪點 ====\n" |
| 522 | +"fig.plot(data=zzh, **zzh_style)\n" |
| 523 | +"fig.plot(data=suao, **suao_style)\n" |
| 524 | +"\n" |
| 525 | +"# ==== 灰色垂直虛線 ====\n" |
| 526 | +"fig.plot(x=[0, 0], y=[0, 7], pen='0.03c,100,--')\n" |
| 527 | +"\n" |
| 528 | +"# ==== 圖例框與圖例內容 ====\n" |
| 529 | +"fig.plot(x=[16, 22, 22, 16], y=[5, 5, 6.5, 6.5], pen='0.05c,black', color='#E6F4F2')\n" |
| 530 | +"fig.plot(data=[[17, 6.05]], **zzh_style)\n" |
| 531 | +"fig.plot(data=[[17, 5.45]], **suao_style)\n" |
| 532 | +"fig.text(x=18, y=6.05, text='Zhuzihu', font='14p', justify='ML')\n" |
| 533 | +"fig.text(x=18, y=5.45, text=\"Su'ao\", font='14p', justify='ML')\n" |
| 534 | +"\n" |
| 535 | +"fig.show()\n" |
| 536 | +"fig.savefig('windspeed_vs_temperature_pygmt.png')" |
| 537 | +msgstr "" |
| 538 | + |
| 539 | +#: ../../SOURCE_DOCS/scatter_plot.rst:436 |
| 540 | +msgid "你可以使用以下的 Binder 連結嘗試此程式碼:" |
| 541 | +msgstr "" |
| 542 | + |
| 543 | +#: ../../SOURCE_DOCS/scatter_plot.rst:443 |
497 | 544 | msgid "習題" |
498 | 545 | msgstr "" |
499 | 546 |
|
500 | | -#: ../../SOURCE_DOCS/scatter_plot.rst:397 |
| 547 | +#: ../../SOURCE_DOCS/scatter_plot.rst:444 |
501 | 548 | msgid "本章使用的資料事實上是依照時間排序的,每日只有一個測量數值。因此,請利用本章中提供的數據,畫出竹子湖與蘇澳測站在 2016 年 1 月份的氣溫每日變化的\\ **折線圖**。" |
502 | 549 | msgstr "" |
503 | 550 |
|
504 | | -#: ../../SOURCE_DOCS/scatter_plot.rst:399 |
| 551 | +#: ../../SOURCE_DOCS/scatter_plot.rst:446 |
505 | 552 | msgid "請利用 ``plot`` 畫出「`大衛之星 <https://zh.wikipedia.org/wiki/%E5%A4%A7%E8%A1%9B%E6%98%9F>`_」。" |
506 | 553 | msgstr "" |
507 | 554 |
|
508 | | -#: ../../SOURCE_DOCS/scatter_plot.rst:401 |
| 555 | +#: ../../SOURCE_DOCS/scatter_plot.rst:448 |
509 | 556 | msgid "`頻果日報,2016 年 1 月 24 日新聞 <http://www.appledaily.com.tw/realtimenews/article/new/20160124/782086/>`_。" |
510 | 557 | msgstr "" |
0 commit comments