Skip to content

Commit 8d8c94d

Browse files
committed
change names: *_line to *_plot_line
1 parent 1f4ed4a commit 8d8c94d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

adafruit_displayio_layout/widgets/cartesian.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def __init__(
255255
self._axesy_bitmap.fill(0)
256256

257257
self._plot_bitmap = displayio.Bitmap(self.width, self.height, 5)
258-
self.clear_lines()
258+
self.clear_plot_lines()
259259
self._screen_palette = displayio.Palette(6)
260260
self._screen_palette.make_transparent(0)
261261
self._screen_palette[1] = self._tick_color
@@ -603,8 +603,8 @@ def update_pointer(self, x: int, y: int) -> None:
603603
self._pointer.x = self.plot_line_point[-1][0]
604604
self._pointer.y = self.plot_line_point[-1][1]
605605

606-
def add_line(self, x: int, y: int) -> None:
607-
"""add_line function.
606+
def add_plot_line(self, x: int, y: int) -> None:
607+
"""add_plot_line function.
608608
609609
add line to the plane.
610610
multiple calls create a line-plot graph.
@@ -626,8 +626,8 @@ def add_line(self, x: int, y: int) -> None:
626626
1,
627627
)
628628

629-
def clear_lines(self, palette_index=5):
630-
"""clear_lines function.
629+
def clear_plot_lines(self, palette_index=5):
630+
"""clear_plot_lines function.
631631
632632
clear all added lines
633633
(clear line-plot graph)

examples/displayio_layout_cartesian_lineplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
print("examples/displayio_layout_cartesian_lineplot.py")
5555

5656
# first point without a wait.
57-
my_plane.add_line(0, 0)
57+
my_plane.add_plot_line(0, 0)
5858
for x, y in data:
59-
my_plane.add_line(x, y)
59+
my_plane.add_plot_line(x, y)
6060
time.sleep(0.5)
6161

6262
while True:

0 commit comments

Comments
 (0)