Skip to content

Commit d414cff

Browse files
committed
Rename AnnotatedXRangeSelection to AnnotatedXRange and update references accordingly
1 parent 75eade0 commit d414cff

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Added support for item title in parameters data set (`RangeShapeParam`)
1616
* This concerns the `XRangeSelection` and `YRangeSelection` items
1717
* New annotated X and Y range selection items:
18-
* Added `AnnotatedXRangeSelection` and `AnnotatedYRangeSelection` items
18+
* Added `AnnotatedXRange` and `AnnotatedYRangeSelection` items
1919
* These items provide X and Y range selection with an annotation label
2020
* They can be created using `make.annotated_xrange` and `make.annotated_yrange` functions
2121

doc/features/items/overview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The following annotation items are available:
7272

7373
* :py:class:`.AnnotatedPoint`
7474
* :py:class:`.AnnotatedSegment`
75-
* :py:class:`.AnnotatedXRangeSelection`
75+
* :py:class:`.AnnotatedXRange`
7676
* :py:class:`.AnnotatedYRangeSelection`
7777
* :py:class:`.AnnotatedRectangle`
7878
* :py:class:`.AnnotatedObliqueRectangle`

doc/features/items/reference.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Annotations
118118
:members:
119119
.. autoclass:: plotpy.items.AnnotatedSegment
120120
:members:
121-
.. autoclass:: plotpy.items.AnnotatedXRangeSelection
121+
.. autoclass:: plotpy.items.AnnotatedXRange
122122
:members:
123123
.. autoclass:: plotpy.items.AnnotatedYRangeSelection
124124
:members:

plotpy/builder/annotation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
AnnotatedPolygon,
3131
AnnotatedRectangle,
3232
AnnotatedSegment,
33-
AnnotatedXRangeSelection,
33+
AnnotatedXRange,
3434
AnnotatedYRangeSelection,
3535
)
3636
from plotpy.styles import AnnotationParam
@@ -403,7 +403,7 @@ def annotated_xrange(
403403
transform_matrix: np.ndarray | None = None,
404404
readonly: bool | None = None,
405405
private: bool | None = None,
406-
) -> AnnotatedXRangeSelection:
406+
) -> AnnotatedXRange:
407407
"""Make an annotated x-range selection `plot item`
408408
409409
Args:
@@ -421,10 +421,10 @@ def annotated_xrange(
421421
private: private. Default is None
422422
423423
Returns:
424-
:py:class:`.AnnotatedXRangeSelection` object
424+
:py:class:`.AnnotatedXRange` object
425425
"""
426426
return self.__annotated_shape(
427-
AnnotatedXRangeSelection,
427+
AnnotatedXRange,
428428
(x0, x1),
429429
title,
430430
subtitle,

plotpy/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ def register_serializable_items(modname, classnames):
616616
"Axes",
617617
"AnnotatedPoint",
618618
"AnnotatedSegment",
619-
"AnnotatedXRangeSelection",
619+
"AnnotatedXRange",
620620
"AnnotatedYRangeSelection",
621621
"AnnotatedRectangle",
622622
"AnnotatedObliqueRectangle",

plotpy/items/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
AnnotatedRectangle,
1212
AnnotatedPolygon,
1313
AnnotatedSegment,
14-
AnnotatedXRangeSelection,
14+
AnnotatedXRange,
1515
AnnotatedYRangeSelection,
1616
AnnotatedShape,
1717
)

plotpy/items/annotation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ def attach(self, plot):
760760
self.shape.attach(plot)
761761

762762

763-
class AnnotatedXRangeSelection(BaseAnnotatedRangeSelection):
763+
class AnnotatedXRange(BaseAnnotatedRangeSelection):
764764
"""
765765
Construct an annotated X range selection with properties set with
766766
*annotationparam* (see :py:class:`.styles.AnnotationParam`)

plotpy/tests/items/test_annotated_range.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Licensed under the terms of the BSD 3-Clause
44
# (see plotpy/LICENSE for details)
55

6-
"""Testing `AnnotatedXRangeSelection` and `AnnotatedYRangeSelection` items"""
6+
"""Testing `AnnotatedXRange` and `AnnotatedYRangeSelection` items"""
77

88
# guitest: show
99

@@ -15,7 +15,7 @@
1515

1616

1717
def test_annotated_range_selection():
18-
"""Test AnnotatedXRangeSelection and AnnotatedYRangeSelection items"""
18+
"""Test AnnotatedXRange and AnnotatedYRangeSelection items"""
1919
x = np.linspace(-10, 10, 200)
2020
y = np.sin(np.sin(np.sin(x)))
2121
with qt_app_context(exec_loop=True):

0 commit comments

Comments
 (0)