Update README.md and example re. pts/points (#856)

Update ag-energy-roundup-curves.ipynb

Update the key name 'point' to 'pts' in the example to the latest version

* 💄

* Update ag-energy-roundup-curves.ipynb

💄
This commit is contained in:
Han
2023-04-07 16:27:47 -07:00
committed by GitHub
parent ee48b26099
commit cf17ad1c42
2 changed files with 3 additions and 11 deletions
+1 -1
View File
@@ -214,7 +214,7 @@ my_char_rotation = my_char_ctm.skew_x
| Property | Description |
|----------|-------------|
|`page_number`| Page number on which this curve was found.|
|`points`| Points — as a list of `(x, top)` tuples — describing the curve.|
|`pts`| Points — as a list of `(x, top)` tuples — describing the curve.|
|`height`| Height of curve's bounding box.|
|`width`| Width of curve's bounding box.|
|`x0`| Distance of curve's left-most point from left side of page.|
@@ -168,14 +168,6 @@
" 'non_stroking_color': 1,\n",
" 'object_type': 'curve',\n",
" 'page_number': 1,\n",
" 'points': [(585.31, 139.44),\n",
" (588.48, 143.16000000000003),\n",
" (591.72, 143.88),\n",
" (594.84, 149.69),\n",
" (598.08, 145.2),\n",
" (601.32, 139.13),\n",
" (604.44, 141.12),\n",
" (607.67, 142.56)],\n",
" 'top': 139.13,\n",
" 'bottom': 149.69,\n",
" 'doctop': 139.13}"
@@ -263,8 +255,8 @@
"colors = [ \"red\", \"blue\", \"green\" ]\n",
"for i, curve in enumerate(report.curves):\n",
" stroke = colors[i%len(colors)]\n",
" im.draw_circles(curve[\"points\"], radius=3, stroke=stroke, fill=\"white\")\n",
" im.draw_line(curve[\"points\"], stroke=stroke, stroke_width=2)\n",
" im.draw_circles(curve[\"pts\"], radius=3, stroke=stroke, fill=\"white\")\n",
" im.draw_line(curve[\"pts\"], stroke=stroke, stroke_width=2)\n",
"im"
]
},