Skip to content

Commit b129077

Browse files
committed
# TODO Make a rectangle function [√] - board.Display reference
# TODO Include functions to equal space ticks [ ] # TODO Make labels and text [ ] # TODO Make Styles applicable [ ] # TODO Animate when overflow [ ] # TODO Add Subticks functionality [ ]
1 parent 5cecb03 commit b129077

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

adafruit_displayio_layout/widgets/cartesian.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
# pylint: disable=too-many-locals, too-many-statements
2626

2727
import displayio
28-
import board
2928
import terminalio
3029
import vectorio
3130
from adafruit_displayio_layout.widgets.widget import Widget
@@ -43,8 +42,8 @@ class Cartesian(Widget):
4342
:param int y: y position of the plane origin
4443
4544
:param int display_color: background color to use defaults to black (0x000000)
46-
:param int width: requested width, in pixels defaults to screen width
47-
:param int height: requested height, in pixels defaults to screen height
45+
:param int width: requested width, in pixels defaults to 100 pixels
46+
:param int height: requested height, in pixels defaults to 100 pixels
4847
4948
:param int axes_color: axes lines color defaults to white (0xFFFFFF)
5049
:param int axes_stroke: axes lines thickness in pixels defaults to 2
@@ -63,10 +62,10 @@ class Cartesian(Widget):
6362
def __init__(
6463
self,
6564
x: int = 10,
66-
y: int = board.DISPLAY.height - 10,
65+
y: int = 10,
6766
display_color=0x000000,
68-
width: int = board.DISPLAY.width,
69-
height: int = board.DISPLAY.height,
67+
width: int = 100,
68+
height: int = 100,
7069
axes_color: int = 0xFFFFFF,
7170
axes_stroke: int = 2,
7271
tick_color: int = 0xFFFFFF,

0 commit comments

Comments
 (0)