Skip to content

Commit 5fde85d

Browse files
committed
adding scale
1 parent e77597e commit 5fde85d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

circuitpython_uplot/uplot.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class Uplot(displayio.Group):
5858
:param int box_color: allows to choose the box line color. Defaults to white ''0xFFFFFF``
5959
:param int tickx_height: x axes tick height in pixels. Defaults to 8.
6060
:param int ticky_height: y axes tick height in pixels. Defaults to 8.
61+
:param int scale: scale of the plot. Defaults to 1.
6162
6263
"""
6364

@@ -73,11 +74,12 @@ def __init__(
7374
box_color: int = 0xFFFFFF,
7475
tickx_height: int = 8,
7576
ticky_height: int = 8,
77+
scale: int = 1
7678
) -> None:
77-
if width not in range(50, 481):
79+
if width not in range(50, 481) and scale == 1:
7880
print("Be sure to verify your values. Defaulting to width=100")
7981
width = 100
80-
if height not in range(50, 321):
82+
if height not in range(50, 321) and scale == 1:
8183
print("Be sure to verify your values. Defaulting to height=100")
8284
height = 100
8385
if x + width > 481:

0 commit comments

Comments
 (0)