Skip to content

Commit cf17ad1

Browse files
authored
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 💄
1 parent ee48b26 commit cf17ad1

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ my_char_rotation = my_char_ctm.skew_x
214214
| Property | Description |
215215
|----------|-------------|
216216
|`page_number`| Page number on which this curve was found.|
217-
|`points`| Points — as a list of `(x, top)` tuples — describing the curve.|
217+
|`pts`| Points — as a list of `(x, top)` tuples — describing the curve.|
218218
|`height`| Height of curve's bounding box.|
219219
|`width`| Width of curve's bounding box.|
220220
|`x0`| Distance of curve's left-most point from left side of page.|

examples/notebooks/ag-energy-roundup-curves.ipynb

+2-10
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,6 @@
168168
" 'non_stroking_color': 1,\n",
169169
" 'object_type': 'curve',\n",
170170
" 'page_number': 1,\n",
171-
" 'points': [(585.31, 139.44),\n",
172-
" (588.48, 143.16000000000003),\n",
173-
" (591.72, 143.88),\n",
174-
" (594.84, 149.69),\n",
175-
" (598.08, 145.2),\n",
176-
" (601.32, 139.13),\n",
177-
" (604.44, 141.12),\n",
178-
" (607.67, 142.56)],\n",
179171
" 'top': 139.13,\n",
180172
" 'bottom': 149.69,\n",
181173
" 'doctop': 139.13}"
@@ -263,8 +255,8 @@
263255
"colors = [ \"red\", \"blue\", \"green\" ]\n",
264256
"for i, curve in enumerate(report.curves):\n",
265257
" stroke = colors[i%len(colors)]\n",
266-
" im.draw_circles(curve[\"points\"], radius=3, stroke=stroke, fill=\"white\")\n",
267-
" im.draw_line(curve[\"points\"], stroke=stroke, stroke_width=2)\n",
258+
" im.draw_circles(curve[\"pts\"], radius=3, stroke=stroke, fill=\"white\")\n",
259+
" im.draw_line(curve[\"pts\"], stroke=stroke, stroke_width=2)\n",
268260
"im"
269261
]
270262
},

0 commit comments

Comments
 (0)