| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -204,7 +204,7 @@ def remove(self): | |||
| 204 | 204 | Note: there is no support for removing the artist's legend entry. | |
| 205 | 205 | """ | |
| 206 | 206 | ||
| 207 | - # There is no method to set the callback. Instead the parent should | ||
| 207 | + # There is no method to set the callback. Instead, the parent should | ||
| 208 | 208 | # set the _remove_method attribute directly. This would be a | |
| 209 | 209 | # protected attribute if Python supported that sort of thing. The | |
| 210 | 210 | # callback has one parameter, which is the child to be removed. | |
@@ -521,7 +521,7 @@ def pick(self, mouseevent): | |||
| 521 | 521 | # tick label) can be outside the bounding box of the | |
| 522 | 522 | # Axes and inaxes will be None | |
| 523 | 523 | # also check that ax is None so that it traverse objects | |
| 524 | - # which do no have an axes property but children might | ||
| 524 | + # which do not have an axes property but children might | ||
| 525 | 525 | a.pick(mouseevent) | |
| 526 | 526 | ||
| 527 | 527 | def set_picker(self, picker): | |
@@ -878,7 +878,7 @@ def set_clip_on(self, b): | |||
| 878 | 878 | """ | |
| 879 | 879 | Set whether the artist uses clipping. | |
| 880 | 880 | ||
| 881 | - When False artists will be visible outside of the Axes which | ||
| 881 | + When False, artists will be visible outside the Axes which | ||
| 882 | 882 | can lead to unexpected results. | |
| 883 | 883 | ||
| 884 | 884 | Parameters | |
@@ -1145,7 +1145,7 @@ def _update_props(self, props, errfmt): | |||
| 1145 | 1145 | Helper for `.Artist.set` and `.Artist.update`. | |
| 1146 | 1146 | ||
| 1147 | 1147 | *errfmt* is used to generate error messages for invalid property | |
| 1148 | - names; it get formatted with ``type(self)`` and the property name. | ||
| 1148 | + names; it gets formatted with ``type(self)`` and the property name. | ||
| 1149 | 1149 | """ | |
| 1150 | 1150 | ret = [] | |
| 1151 | 1151 | with cbook._setattr_cm(self, eventson=False): | |
@@ -1371,7 +1371,7 @@ def set_mouseover(self, mouseover): | |||
| 1371 | 1371 | def _get_tightbbox_for_layout_only(obj, *args, **kwargs): | |
| 1372 | 1372 | """ | |
| 1373 | 1373 | Matplotlib's `.Axes.get_tightbbox` and `.Axis.get_tightbbox` support a | |
| 1374 | - *for_layout_only* kwarg; this helper tries to uses the kwarg but skips it | ||
| 1374 | + *for_layout_only* kwarg; this helper tries to use the kwarg but skips it | ||
| 1375 | 1375 | when encountering third-party subclasses that do not support it. | |
| 1376 | 1376 | """ | |
| 1377 | 1377 | try: | |
@@ -1463,7 +1463,7 @@ def get_valid_values(self, attr): | |||
| 1463 | 1463 | # although barely relevant wrt. matplotlib's total import time. | |
| 1464 | 1464 | param_name = func.__code__.co_varnames[1] | |
| 1465 | 1465 | # We could set the presence * based on whether the parameter is a | |
| 1466 | - # varargs (it can't be a varkwargs) but it's not really worth the it. | ||
| 1466 | + # varargs (it can't be a varkwargs) but it's not really worth it. | ||
| 1467 | 1467 | match = re.search(r"(?m)^ *\*?{} : (.+)".format(param_name), docstring) | |
| 1468 | 1468 | if match: | |
| 1469 | 1469 | return match.group(1) | |
@@ -1523,7 +1523,7 @@ def aliased_name(self, s): | |||
| 1523 | 1523 | """ | |
| 1524 | 1524 | Return 'PROPNAME or alias' if *s* has an alias, else return 'PROPNAME'. | |
| 1525 | 1525 | ||
| 1526 | - e.g., for the line markerfacecolor property, which has an | ||
| 1526 | + For example, for the line markerfacecolor property, which has an | ||
| 1527 | 1527 | alias, return 'markerfacecolor or mfc' and for the transform | |
| 1528 | 1528 | property, which does not, return 'transform'. | |
| 1529 | 1529 | """ | |
@@ -1551,7 +1551,7 @@ def aliased_name_rest(self, s, target): | |||
| 1551 | 1551 | Return 'PROPNAME or alias' if *s* has an alias, else return 'PROPNAME', | |
| 1552 | 1552 | formatted for reST. | |
| 1553 | 1553 | ||
| 1554 | - e.g., for the line markerfacecolor property, which has an | ||
| 1554 | + For example, for the line markerfacecolor property, which has an | ||
| 1555 | 1555 | alias, return 'markerfacecolor or mfc' and for the transform | |
| 1556 | 1556 | property, which does not, return 'transform'. | |
| 1557 | 1557 | """ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | """ | |
| 2 | - Classes for the ticks and x and y axis. | ||
| 2 | + Classes for the ticks and x- and y-axis. | ||
| 3 | 3 | """ | |
| 4 | 4 | ||
| 5 | 5 | import datetime | |
@@ -278,13 +278,13 @@ def _get_text2(self): | |||
| 278 | 278 | """Get the default Text 2 instance.""" | |
| 279 | 279 | ||
| 280 | 280 | def _get_tick1line(self): | |
| 281 | - """Get the default line2D instance for tick1.""" | ||
| 281 | + """Get the default `.Line2D` instance for tick1.""" | ||
| 282 | 282 | ||
| 283 | 283 | def _get_tick2line(self): | |
| 284 | - """Get the default line2D instance for tick2.""" | ||
| 284 | + """Get the default `.Line2D` instance for tick2.""" | ||
| 285 | 285 | ||
| 286 | 286 | def _get_gridline(self): | |
| 287 | - """Get the default grid Line2d instance for this tick.""" | ||
| 287 | + """Get the default grid `.Line2D` instance for this tick.""" | ||
| 288 | 288 | ||
| 289 | 289 | def get_loc(self): | |
| 290 | 290 | """Return the tick location (data coords) as a scalar.""" | |
@@ -796,7 +796,7 @@ def _set_axes_scale(self, value, **kwargs): | |||
| 796 | 796 | ||
| 797 | 797 | Notes | |
| 798 | 798 | ----- | |
| 799 | - By default, Matplotlib supports the above mentioned scales. | ||
| 799 | + By default, Matplotlib supports the above-mentioned scales. | ||
| 800 | 800 | Additionally, custom scales may be registered using | |
| 801 | 801 | `matplotlib.scale.register_scale`. These scales can then also | |
| 802 | 802 | be used here. | |
@@ -1591,7 +1591,7 @@ def grid(self, visible=None, which='major', **kwargs): | |||
| 1591 | 1591 | def update_units(self, data): | |
| 1592 | 1592 | """ | |
| 1593 | 1593 | Introspect *data* for units converter and update the | |
| 1594 | - axis.converter instance if necessary. Return *True* | ||
| 1594 | + ``axis.converter`` instance if necessary. Return *True* | ||
| 1595 | 1595 | if *data* is registered for unit conversion. | |
| 1596 | 1596 | """ | |
| 1597 | 1597 | converter = munits.registry.get_converter(data) | |
@@ -2034,7 +2034,7 @@ def _get_tick_boxes_siblings(self, renderer): | |||
| 2034 | 2034 | Get the bounding boxes for this `.axis` and its siblings | |
| 2035 | 2035 | as set by `.Figure.align_xlabels` or `.Figure.align_ylabels`. | |
| 2036 | 2036 | ||
| 2037 | - By default it just gets bboxes for self. | ||
| 2037 | + By default, it just gets bboxes for *self*. | ||
| 2038 | 2038 | """ | |
| 2039 | 2039 | # Get the Grouper keeping track of x or y label groups for this figure. | |
| 2040 | 2040 | axis_names = [ | |
@@ -2213,7 +2213,7 @@ def _init(self): | |||
| 2213 | 2213 | self.offset_text_position = 'bottom' | |
| 2214 | 2214 | ||
| 2215 | 2215 | def contains(self, mouseevent): | |
| 2216 | - """Test whether the mouse event occurred in the x axis.""" | ||
| 2216 | + """Test whether the mouse event occurred in the x-axis.""" | ||
| 2217 | 2217 | inside, info = self._default_contains(mouseevent) | |
| 2218 | 2218 | if inside is not None: | |
| 2219 | 2219 | return inside, info | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | """ | |
| 2 | - A module providing some utility functions regarding Bezier path manipulation. | ||
| 2 | + A module providing some utility functions regarding Bézier path manipulation. | ||
| 3 | 3 | """ | |
| 4 | 4 | ||
| 5 | 5 | from functools import lru_cache | |
@@ -94,7 +94,7 @@ def _de_casteljau1(beta, t): | |||
| 94 | 94 | ||
| 95 | 95 | def split_de_casteljau(beta, t): | |
| 96 | 96 | """ | |
| 97 | - Split a Bezier segment defined by its control points *beta* into two | ||
| 97 | + Split a Bézier segment defined by its control points *beta* into two | ||
| 98 | 98 | separate segments divided at *t* and return their control points. | |
| 99 | 99 | """ | |
| 100 | 100 | beta = np.asarray(beta) | |
@@ -113,7 +113,7 @@ def split_de_casteljau(beta, t): | |||
| 113 | 113 | def find_bezier_t_intersecting_with_closedpath( | |
| 114 | 114 | bezier_point_at_t, inside_closedpath, t0=0., t1=1., tolerance=0.01): | |
| 115 | 115 | """ | |
| 116 | - Find the intersection of the Bezier curve with a closed path. | ||
| 116 | + Find the intersection of the Bézier curve with a closed path. | ||
| 117 | 117 | ||
| 118 | 118 | The intersection point *t* is approximated by two parameters *t0*, *t1* | |
| 119 | 119 | such that *t0* <= *t* <= *t1*. | |
@@ -126,7 +126,7 @@ def find_bezier_t_intersecting_with_closedpath( | |||
| 126 | 126 | Parameters | |
| 127 | 127 | ---------- | |
| 128 | 128 | bezier_point_at_t : callable | |
| 129 | - A function returning x, y coordinates of the Bezier at parameter *t*. | ||
| 129 | + A function returning x, y coordinates of the Bézier at parameter *t*. | ||
| 130 | 130 | It must have the signature:: | |
| 131 | 131 | ||
| 132 | 132 | bezier_point_at_t(t: float) -> tuple[float, float] | |
@@ -146,7 +146,7 @@ def find_bezier_t_intersecting_with_closedpath( | |||
| 146 | 146 | Returns | |
| 147 | 147 | ------- | |
| 148 | 148 | t0, t1 : float | |
| 149 | - The Bezier path parameters. | ||
| 149 | + The Bézier path parameters. | ||
| 150 | 150 | """ | |
| 151 | 151 | start = bezier_point_at_t(t0) | |
| 152 | 152 | end = bezier_point_at_t(t1) | |
@@ -180,7 +180,7 @@ def find_bezier_t_intersecting_with_closedpath( | |||
| 180 | 180 | ||
| 181 | 181 | class BezierSegment: | |
| 182 | 182 | """ | |
| 183 | - A d-dimensional Bezier segment. | ||
| 183 | + A d-dimensional Bézier segment. | ||
| 184 | 184 | ||
| 185 | 185 | Parameters | |
| 186 | 186 | ---------- | |
@@ -199,7 +199,7 @@ def __init__(self, control_points): | |||
| 199 | 199 | ||
| 200 | 200 | def __call__(self, t): | |
| 201 | 201 | """ | |
| 202 | - Evaluate the Bezier curve at point(s) t in [0, 1]. | ||
| 202 | + Evaluate the Bézier curve at point(s) *t* in [0, 1]. | ||
| 203 | 203 | ||
| 204 | 204 | Parameters | |
| 205 | 205 | ---------- | |
@@ -239,15 +239,15 @@ def degree(self): | |||
| 239 | 239 | @property | |
| 240 | 240 | def polynomial_coefficients(self): | |
| 241 | 241 | r""" | |
| 242 | - The polynomial coefficients of the Bezier curve. | ||
| 242 | + The polynomial coefficients of the Bézier curve. | ||
| 243 | 243 | ||
| 244 | 244 | .. warning:: Follows opposite convention from `numpy.polyval`. | |
| 245 | 245 | ||
| 246 | 246 | Returns | |
| 247 | 247 | ------- | |
| 248 | 248 | (n+1, d) array | |
| 249 | 249 | Coefficients after expanding in polynomial basis, where :math:`n` | |
| 250 | - is the degree of the bezier curve and :math:`d` its dimension. | ||
| 250 | + is the degree of the Bézier curve and :math:`d` its dimension. | ||
| 251 | 251 | These are the numbers (:math:`C_j`) such that the curve can be | |
| 252 | 252 | written :math:`\sum_{j=0}^n C_j t^j`. | |
| 253 | 253 | ||
@@ -308,12 +308,12 @@ def axis_aligned_extrema(self): | |||
| 308 | 308 | def split_bezier_intersecting_with_closedpath( | |
| 309 | 309 | bezier, inside_closedpath, tolerance=0.01): | |
| 310 | 310 | """ | |
| 311 | - Split a Bezier curve into two at the intersection with a closed path. | ||
| 311 | + Split a Bézier curve into two at the intersection with a closed path. | ||
| 312 | 312 | ||
| 313 | 313 | Parameters | |
| 314 | 314 | ---------- | |
| 315 | 315 | bezier : (N, 2) array-like | |
| 316 | - Control points of the Bezier segment. See `.BezierSegment`. | ||
| 316 | + Control points of the Bézier segment. See `.BezierSegment`. | ||
| 317 | 317 | inside_closedpath : callable | |
| 318 | 318 | A function returning True if a given point (x, y) is inside the | |
| 319 | 319 | closed path. See also `.find_bezier_t_intersecting_with_closedpath`. | |
@@ -324,7 +324,7 @@ def split_bezier_intersecting_with_closedpath( | |||
| 324 | 324 | Returns | |
| 325 | 325 | ------- | |
| 326 | 326 | left, right | |
| 327 | - Lists of control points for the two Bezier segments. | ||
| 327 | + Lists of control points for the two Bézier segments. | ||
| 328 | 328 | """ | |
| 329 | 329 | ||
| 330 | 330 | bz = BezierSegment(bezier) | |
@@ -461,13 +461,13 @@ def check_if_parallel(dx1, dy1, dx2, dy2, tolerance=1.e-5): | |||
| 461 | 461 | ||
| 462 | 462 | def get_parallels(bezier2, width): | |
| 463 | 463 | """ | |
| 464 | - Given the quadratic Bezier control points *bezier2*, returns | ||
| 465 | - control points of quadratic Bezier lines roughly parallel to given | ||
| 464 | + Given the quadratic Bézier control points *bezier2*, returns | ||
| 465 | + control points of quadratic Bézier lines roughly parallel to given | ||
| 466 | 466 | one separated by *width*. | |
| 467 | 467 | """ | |
| 468 | 468 | ||
| 469 | 469 | # The parallel Bezier lines are constructed by following ways. | |
| 470 | - # c1 and c2 are control points representing the begin and end of the | ||
| 470 | + # c1 and c2 are control points representing the start and end of the | ||
| 471 | 471 | # Bezier line. | |
| 472 | 472 | # cm is the middle point | |
| 473 | 473 | ||
@@ -485,7 +485,7 @@ def get_parallels(bezier2, width): | |||
| 485 | 485 | cos_t2, sin_t2 = cos_t1, sin_t1 | |
| 486 | 486 | else: | |
| 487 | 487 | # t1 and t2 is the angle between c1 and cm, cm, c2. They are | |
| 488 | - # also a angle of the tangential line of the path at c1 and c2 | ||
| 488 | + # also an angle of the tangential line of the path at c1 and c2 | ||
| 489 | 489 | cos_t1, sin_t1 = get_cos_sin(c1x, c1y, cmx, cmy) | |
| 490 | 490 | cos_t2, sin_t2 = get_cos_sin(cmx, cmy, c2x, c2y) | |
| 491 | 491 | ||
@@ -535,7 +535,7 @@ def get_parallels(bezier2, width): | |||
| 535 | 535 | ||
| 536 | 536 | def find_control_points(c1x, c1y, mmx, mmy, c2x, c2y): | |
| 537 | 537 | """ | |
| 538 | - Find control points of the Bezier curve passing through (*c1x*, *c1y*), | ||
| 538 | + Find control points of the Bézier curve passing through (*c1x*, *c1y*), | ||
| 539 | 539 | (*mmx*, *mmy*), and (*c2x*, *c2y*), at parametric values 0, 0.5, and 1. | |
| 540 | 540 | """ | |
| 541 | 541 | cmx = .5 * (4 * mmx - (c1x + c2x)) | |
@@ -545,8 +545,8 @@ def find_control_points(c1x, c1y, mmx, mmy, c2x, c2y): | |||
| 545 | 545 | ||
| 546 | 546 | def make_wedged_bezier2(bezier2, width, w1=1., wm=0.5, w2=0.): | |
| 547 | 547 | """ | |
| 548 | - Being similar to get_parallels, returns control points of two quadratic | ||
| 549 | - Bezier lines having a width roughly parallel to given one separated by | ||
| 548 | + Being similar to `get_parallels`, returns control points of two quadratic | ||
| 549 | + Bézier lines having a width roughly parallel to given one separated by | ||
| 550 | 550 | *width*. | |
| 551 | 551 | """ | |
| 552 | 552 | ||
@@ -556,7 +556,7 @@ def make_wedged_bezier2(bezier2, width, w1=1., wm=0.5, w2=0.): | |||
| 556 | 556 | c3x, c3y = bezier2[2] | |
| 557 | 557 | ||
| 558 | 558 | # t1 and t2 is the angle between c1 and cm, cm, c3. | |
| 559 | - # They are also a angle of the tangential line of the path at c1 and c3 | ||
| 559 | + # They are also an angle of the tangential line of the path at c1 and c3 | ||
| 560 | 560 | cos_t1, sin_t1 = get_cos_sin(c1x, c1y, cmx, cmy) | |
| 561 | 561 | cos_t2, sin_t2 = get_cos_sin(cmx, cmy, c3x, c3y) | |
| 562 | 562 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -715,7 +715,7 @@ def set_color(self, c): | |||
| 715 | 715 | ||
| 716 | 716 | Parameters | |
| 717 | 717 | ---------- | |
| 718 | - c : color or list of rgba tuples | ||
| 718 | + c : color or list of RGBA tuples | ||
| 719 | 719 | ||
| 720 | 720 | See Also | |
| 721 | 721 | -------- | |
@@ -1468,7 +1468,7 @@ def set_color(self, c): | |||
| 1468 | 1468 | ---------- | |
| 1469 | 1469 | c : color or list of colors | |
| 1470 | 1470 | Single color (all lines have same color), or a | |
| 1471 | - sequence of rgba tuples; if it is a sequence the lines will | ||
| 1471 | + sequence of RGBA tuples; if it is a sequence the lines will | ||
| 1472 | 1472 | cycle through the sequence. | |
| 1473 | 1473 | """ | |
| 1474 | 1474 | self.set_edgecolor(c) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -821,7 +821,7 @@ def add_lines(self, *args, **kwargs): | |||
| 821 | 821 | ||
| 822 | 822 | def update_ticks(self): | |
| 823 | 823 | """ | |
| 824 | - Setup the ticks and ticklabels. This should not be needed by users. | ||
| 824 | + Set up the ticks and ticklabels. This should not be needed by users. | ||
| 825 | 825 | """ | |
| 826 | 826 | # Get the locator and formatter; defaults to self._locator if not None. | |
| 827 | 827 | self._get_ticker_locator_formatter() | |
@@ -1024,7 +1024,7 @@ def _set_scale(self, scale, **kwargs): | |||
| 1024 | 1024 | ||
| 1025 | 1025 | Notes | |
| 1026 | 1026 | ----- | |
| 1027 | - By default, Matplotlib supports the above mentioned scales. | ||
| 1027 | + By default, Matplotlib supports the above-mentioned scales. | ||
| 1028 | 1028 | Additionally, custom scales may be registered using | |
| 1029 | 1029 | `matplotlib.scale.register_scale`. These scales can then also | |
| 1030 | 1030 | be used here. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments