|
52 | 52 | "source": [
|
53 | 53 | "import pygmt\n",
|
54 | 54 | "import numpy as np\n",
|
55 |
| - "import pandas as pd " |
| 55 | + "import pandas as pd \n", |
| 56 | + "\n", |
| 57 | + "img_dpi = 150" |
56 | 58 | ]
|
57 | 59 | },
|
58 | 60 | {
|
|
579 | 581 | " history: gmt xyz2grd @GMTAPI@-S-I-D-M-T-N-000000 -G@GMTAPI@-S-O-G-G...\n",
|
580 | 582 | " description: \n",
|
581 | 583 | " long_name: z\n",
|
582 |
| - " actual_range: [nan nan]</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'z'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>lat</span>: 481</li><li><span class='xr-has-index'>lon</span>: 361</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-0b52cfa8-20f5-426d-a7a5-016fcf0a50e1' class='xr-array-in' type='checkbox' checked><label for='section-0b52cfa8-20f5-426d-a7a5-016fcf0a50e1' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>-3.47e+03 -3.474e+03 -3.456e+03 -3.511e+03 ... 116.0 108.0 117.0 141.0</span></div><div class='xr-array-data'><pre>array([[-3470.5, -3474. , -3455.5, ..., -50. , -52. , -54. ],\n", |
| 584 | + " actual_range: [nan nan]</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'z'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>lat</span>: 481</li><li><span class='xr-has-index'>lon</span>: 361</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-8eeb15c2-89aa-438e-a70c-b51c8562bf02' class='xr-array-in' type='checkbox' checked><label for='section-8eeb15c2-89aa-438e-a70c-b51c8562bf02' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>-3.47e+03 -3.474e+03 -3.456e+03 -3.511e+03 ... 116.0 108.0 117.0 141.0</span></div><div class='xr-array-data'><pre>array([[-3470.5, -3474. , -3455.5, ..., -50. , -52. , -54. ],\n", |
583 | 585 | " [-3447.5, -3438.5, -3436. , ..., -46. , -50.5, -51. ],\n",
|
584 | 586 | " [-3440.5, -3419.5, -3419. , ..., -44.5, -49. , -51. ],\n",
|
585 | 587 | " ...,\n",
|
586 | 588 | " [ -970. , -1083. , -1261.5, ..., 114. , 126.5, 129. ],\n",
|
587 | 589 | " [ -959. , -1044. , -1204. , ..., 110.5, 124.5, 146. ],\n",
|
588 |
| - " [-1033.5, -1132.5, -1298. , ..., 108. , 117. , 141. ]])</pre></div></div></li><li class='xr-section-item'><input id='section-f0c74da0-b3aa-482f-9017-d12d56a93395' class='xr-section-summary-in' type='checkbox' checked><label for='section-f0c74da0-b3aa-482f-9017-d12d56a93395' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lat</span></div><div class='xr-var-dims'>(lat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-40.0 -39.92 ... -0.08333 0.0</div><input id='attrs-56f97b54-c0c3-4d02-a8a0-e20fa740a33f' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-56f97b54-c0c3-4d02-a8a0-e20fa740a33f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-57cc5634-e504-4862-8d97-a49935aed8b3' class='xr-var-data-in' type='checkbox'><label for='data-57cc5634-e504-4862-8d97-a49935aed8b3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>latitude</dd><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>standard_name :</span></dt><dd>latitude</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>actual_range :</span></dt><dd>[-40. 0.]</dd></dl></div><div class='xr-var-data'><pre>array([-40. , -39.916667, -39.833333, ..., -0.166667, -0.083333,\n", |
589 |
| - " 0. ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lon</span></div><div class='xr-var-dims'>(lon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-90.0 -89.92 ... -60.08 -60.0</div><input id='attrs-e8d69b4c-3449-4ab5-be50-70aeacf9667f' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-e8d69b4c-3449-4ab5-be50-70aeacf9667f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d7f54e80-ee61-49ff-9e3e-2ae8a50c742a' class='xr-var-data-in' type='checkbox'><label for='data-d7f54e80-ee61-49ff-9e3e-2ae8a50c742a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>longitude</dd><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>standard_name :</span></dt><dd>longitude</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>actual_range :</span></dt><dd>[-90. -60.]</dd></dl></div><div class='xr-var-data'><pre>array([-90. , -89.916667, -89.833333, ..., -60.166667, -60.083333,\n", |
590 |
| - " -60. ])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-d2ec86bc-feb6-4969-8c4d-ab5186efb8d1' class='xr-section-summary-in' type='checkbox' ><label for='section-d2ec86bc-feb6-4969-8c4d-ab5186efb8d1' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>lat</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-bf8b8893-b9cf-41dc-8926-dd30e0b6f521' class='xr-index-data-in' type='checkbox'/><label for='index-bf8b8893-b9cf-41dc-8926-dd30e0b6f521' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ -40.0, -39.916666666666664, -39.83333333333333,\n", |
| 590 | + " [-1033.5, -1132.5, -1298. , ..., 108. , 117. , 141. ]])</pre></div></div></li><li class='xr-section-item'><input id='section-31d1b613-b00e-4e40-990c-d3b3d38ee657' class='xr-section-summary-in' type='checkbox' checked><label for='section-31d1b613-b00e-4e40-990c-d3b3d38ee657' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lat</span></div><div class='xr-var-dims'>(lat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-40.0 -39.92 ... -0.08333 0.0</div><input id='attrs-6df45b59-2f43-4343-8c21-b090309ed210' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-6df45b59-2f43-4343-8c21-b090309ed210' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-24205071-a2bc-419c-bc1e-3a6b7fe1e403' class='xr-var-data-in' type='checkbox'><label for='data-24205071-a2bc-419c-bc1e-3a6b7fe1e403' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>latitude</dd><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>standard_name :</span></dt><dd>latitude</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>actual_range :</span></dt><dd>[-40. 0.]</dd></dl></div><div class='xr-var-data'><pre>array([-40. , -39.916667, -39.833333, ..., -0.166667, -0.083333,\n", |
| 591 | + " 0. ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lon</span></div><div class='xr-var-dims'>(lon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-90.0 -89.92 ... -60.08 -60.0</div><input id='attrs-6d3ede37-01a5-4610-a9e4-b2f9ead38c7c' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-6d3ede37-01a5-4610-a9e4-b2f9ead38c7c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-02fd12f3-63a5-4174-80b2-f3b9a4d4524c' class='xr-var-data-in' type='checkbox'><label for='data-02fd12f3-63a5-4174-80b2-f3b9a4d4524c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>longitude</dd><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>standard_name :</span></dt><dd>longitude</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>actual_range :</span></dt><dd>[-90. -60.]</dd></dl></div><div class='xr-var-data'><pre>array([-90. , -89.916667, -89.833333, ..., -60.166667, -60.083333,\n", |
| 592 | + " -60. ])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-aff6e2d6-58be-4b4a-8c01-309ce0097075' class='xr-section-summary-in' type='checkbox' ><label for='section-aff6e2d6-58be-4b4a-8c01-309ce0097075' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>lat</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-45fae41e-535f-4426-b1cf-12b14d751f29' class='xr-index-data-in' type='checkbox'/><label for='index-45fae41e-535f-4426-b1cf-12b14d751f29' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ -40.0, -39.916666666666664, -39.83333333333333,\n", |
591 | 593 | " -39.75, -39.666666666666664, -39.58333333333333,\n",
|
592 | 594 | " -39.5, -39.416666666666664, -39.33333333333333,\n",
|
593 | 595 | " -39.25,\n",
|
|
596 | 598 | " -0.5, -0.41666666666666663, -0.3333333333333333,\n",
|
597 | 599 | " -0.25, -0.16666666666666666, -0.08333333333333333,\n",
|
598 | 600 | " 0.0],\n",
|
599 |
| - " dtype='float64', name='lat', length=481))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>lon</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-80c30303-50ff-4586-9839-276d6f8f269d' class='xr-index-data-in' type='checkbox'/><label for='index-80c30303-50ff-4586-9839-276d6f8f269d' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ -90.0, -89.91666666666667, -89.83333333333333,\n", |
| 601 | + " dtype='float64', name='lat', length=481))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>lon</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-1ce74488-c48e-482b-b833-5b2a1c66a407' class='xr-index-data-in' type='checkbox'/><label for='index-1ce74488-c48e-482b-b833-5b2a1c66a407' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ -90.0, -89.91666666666667, -89.83333333333333,\n", |
600 | 602 | " -89.75, -89.66666666666667, -89.58333333333333,\n",
|
601 | 603 | " -89.5, -89.41666666666667, -89.33333333333333,\n",
|
602 | 604 | " -89.25,\n",
|
|
605 | 607 | " -60.5, -60.41666666666667, -60.333333333333336,\n",
|
606 | 608 | " -60.25, -60.16666666666667, -60.083333333333336,\n",
|
607 | 609 | " -60.0],\n",
|
608 |
| - " dtype='float64', name='lon', length=361))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-249d8eea-8dd3-4016-bb6f-b9c97d1db1b9' class='xr-section-summary-in' type='checkbox' checked><label for='section-249d8eea-8dd3-4016-bb6f-b9c97d1db1b9' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>Conventions :</span></dt><dd>CF-1.7</dd><dt><span>title :</span></dt><dd></dd><dt><span>history :</span></dt><dd>gmt xyz2grd @GMTAPI@-S-I-D-M-T-N-000000 -G@GMTAPI@-S-O-G-G-G-Y-000001 -I5m -R-90/-60/-40/0</dd><dt><span>description :</span></dt><dd></dd><dt><span>long_name :</span></dt><dd>z</dd><dt><span>actual_range :</span></dt><dd>[nan nan]</dd></dl></div></li></ul></div></div>" |
| 610 | + " dtype='float64', name='lon', length=361))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-b2cab0d1-3b77-4146-9631-5eb21652d89f' class='xr-section-summary-in' type='checkbox' checked><label for='section-b2cab0d1-3b77-4146-9631-5eb21652d89f' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>Conventions :</span></dt><dd>CF-1.7</dd><dt><span>title :</span></dt><dd></dd><dt><span>history :</span></dt><dd>gmt xyz2grd @GMTAPI@-S-I-D-M-T-N-000000 -G@GMTAPI@-S-O-G-G-G-Y-000001 -I5m -R-90/-60/-40/0</dd><dt><span>description :</span></dt><dd></dd><dt><span>long_name :</span></dt><dd>z</dd><dt><span>actual_range :</span></dt><dd>[nan nan]</dd></dl></div></li></ul></div></div>" |
609 | 611 | ],
|
610 | 612 | "text/plain": [
|
611 | 613 | "<xarray.DataArray 'z' (lat: 481, lon: 361)> Size: 1MB\n",
|
|
692 | 694 | "\n",
|
693 | 695 | "fig.grdcontour(grid=grid, annotation=2000, levels=1000, limit=[-4000, 0], pen=\"0.5p,white\")\n",
|
694 | 696 | "\n",
|
695 |
| - "fig.show(dpi=150)" |
| 697 | + "fig.show(dpi=img_dpi)" |
696 | 698 | ]
|
697 | 699 | },
|
698 | 700 | {
|
|
758 | 760 | " unit=True,\n",
|
759 | 761 | ")\n",
|
760 | 762 | "\n",
|
761 |
| - "fig.show(dpi=150)" |
| 763 | + "fig.show(dpi=img_dpi)" |
762 | 764 | ]
|
763 | 765 | },
|
764 | 766 | {
|
|
1054 | 1056 | " font=\"12p\"\n",
|
1055 | 1057 | ")\n",
|
1056 | 1058 | "\n",
|
1057 |
| - "fig.show(dpi=150)" |
| 1059 | + "fig.show(dpi=img_dpi)" |
1058 | 1060 | ]
|
1059 | 1061 | },
|
1060 | 1062 | {
|
|
1105 | 1107 | " close=\"+y-7500\", # Force closed polygon\n",
|
1106 | 1108 | ")\n",
|
1107 | 1109 | "\n",
|
1108 |
| - "fig.show(dpi=150)" |
| 1110 | + "fig.show(dpi=img_dpi)" |
1109 | 1111 | ]
|
1110 | 1112 | },
|
1111 | 1113 | {
|
|
1345 | 1347 | " box=\"+gwhite@30\",\n",
|
1346 | 1348 | ")\n",
|
1347 | 1349 | "\n",
|
1348 |
| - "fig.show(dpi=150)" |
| 1350 | + "fig.show(dpi=img_dpi)" |
1349 | 1351 | ]
|
1350 | 1352 | },
|
1351 | 1353 | {
|
|
1429 | 1431 | " offset=\"+p0.1p,orange+s0.2c\",\n",
|
1430 | 1432 | ")\n",
|
1431 | 1433 | " \n",
|
1432 |
| - "fig.show(dpi=150)" |
| 1434 | + "fig.show(dpi=img_dpi)" |
1433 | 1435 | ]
|
1434 | 1436 | },
|
1435 | 1437 | {
|
|
0 commit comments