Skip to content

Commit 1234d0a

Browse files
authored
Merge pull request #7 from kmatch98/auto_update
Ran black
2 parents 525a48a + a972ae5 commit 1234d0a

3 files changed

+32
-32
lines changed

examples/display_shapes_sparkline_simpletest.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
# See the bottom for a code example using the `sparkline` Class.
55

66
# # File: display_shapes_sparkline.py
7-
# A sparkline is a scrolling line graph, where any values added to sparkline using
7+
# A sparkline is a scrolling line graph, where any values added to sparkline using
88
# `add_value` are plotted.
99
#
10-
# The `sparkline` class creates an element suitable for adding to the display using
10+
# The `sparkline` class creates an element suitable for adding to the display using
1111
# `display.show(mySparkline)`
1212
# or adding to a `displayio.Group` to be displayed.
1313
#
14-
# When creating the sparkline, identify the number of `max_items` that will be
14+
# When creating the sparkline, identify the number of `max_items` that will be
1515
# included in the graph.
16-
# When additional elements are added to the sparkline and the number of items has
17-
# exceeded max_items, any excess values are removed from the left of the graph,
16+
# When additional elements are added to the sparkline and the number of items has
17+
# exceeded max_items, any excess values are removed from the left of the graph,
1818
# and new values are added to the right.
1919

2020

@@ -52,7 +52,7 @@
5252

5353
while not spi.try_lock():
5454
spi.configure(baudrate=32000000)
55-
55+
5656
spi.unlock()
5757

5858
display_bus = displayio.FourWire(
@@ -95,17 +95,17 @@
9595
chartWidth = display.width
9696
chartHeight = display.height
9797

98-
# mySparkline1 uses a vertical y range between 0 to 10 and will contain a
98+
# mySparkline1 uses a vertical y range between 0 to 10 and will contain a
9999
# maximum of 40 items
100100
mySparkline1 = Sparkline(
101101
width=chartWidth, height=chartHeight, max_items=40, yMin=0, yMax=10, x=0, y=0
102102
)
103103

104-
# Create a group to hold the sparkline and append the sparkline into the
104+
# Create a group to hold the sparkline and append the sparkline into the
105105
# group (myGroup)
106106
#
107-
# Note: In cases where display elements will overlap, then the order the elements
108-
# are added to the group will set which is on top. Latter elements are displayed
107+
# Note: In cases where display elements will overlap, then the order the elements
108+
# are added to the group will set which is on top. Latter elements are displayed
109109
# on top of former elemtns.
110110
myGroup = displayio.Group(max_size=1)
111111

examples/display_shapes_sparkline_ticks.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# See the bottom for a code example using the `sparkline` Class.
55

66
# # File: display_shapes_sparkline.py
7-
# A sparkline is a scrolling line graph, where any values added to sparkline
7+
# A sparkline is a scrolling line graph, where any values added to sparkline
88
# using `add_value` are plotted.
99
#
10-
# The `sparkline` class creates an element suitable for adding to the display
10+
# The `sparkline` class creates an element suitable for adding to the display
1111
# using `display.show(mySparkline)` or adding to a `displayio.Group` to be displayed.
1212
#
13-
# When creating the sparkline, identify the number of `max_items` that will be
13+
# When creating the sparkline, identify the number of `max_items` that will be
1414
# included in the graph.
15-
# When additional elements are added to the sparkline and the number of items
16-
# has exceeded max_items, any excess values are removed from the left of the
15+
# When additional elements are added to the sparkline and the number of items
16+
# has exceeded max_items, any excess values are removed from the left of the
1717
# graph, and new values are added to the right.
1818

1919

@@ -103,7 +103,7 @@
103103

104104
# Setup the first bitmap and sparkline
105105
# This sparkline has no background bitmap
106-
# mySparkline1 uses a vertical y range between 0 to 10 and will contain a
106+
# mySparkline1 uses a vertical y range between 0 to 10 and will contain a
107107
# maximum of 40 items
108108
mySparkline1 = Sparkline(
109109
width=chartWidth,
@@ -146,8 +146,8 @@
146146
# Create a group to hold the sparkline, text, rectangle and tickmarks
147147
# append them into the group (myGroup)
148148
#
149-
# Note: In cases where display elements will overlap, then the order the
150-
# elements are added to the group will set which is on top. Latter elements
149+
# Note: In cases where display elements will overlap, then the order the
150+
# elements are added to the group will set which is on top. Latter elements
151151
# are displayed on top of former elemtns.
152152

153153
myGroup = displayio.Group(max_size=20)

examples/display_shapes_sparkline_triple.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# See the bottom for a code example using the `sparkline` Class.
55

66
# # File: display_shapes_sparkline.py
7-
# A sparkline is a scrolling line graph, where any values added to sparkline
7+
# A sparkline is a scrolling line graph, where any values added to sparkline
88
# using `add_value` are plotted.
99
#
10-
# The `sparkline` class creates an element suitable for adding to the display
10+
# The `sparkline` class creates an element suitable for adding to the display
1111
# using `display.show(mySparkline)` or adding to a `displayio.Group` to be displayed.
1212
#
13-
# When creating the sparkline, identify the number of `max_items` that will be
13+
# When creating the sparkline, identify the number of `max_items` that will be
1414
# included in the graph.
15-
# When additional elements are added to the sparkline and the number of items
16-
# has exceeded max_items, any excess values are removed from the left of the
15+
# When additional elements are added to the sparkline and the number of items
16+
# has exceeded max_items, any excess values are removed from the left of the
1717
# graph, and new values are added to the right.
1818

1919

@@ -78,7 +78,7 @@
7878
display_bus,
7979
width=DISPLAY_WIDTH,
8080
height=DISPLAY_HEIGHT,
81-
rotation=180, # The rotation can be adjusted to match your configuration.
81+
rotation=180, # The rotation can be adjusted to match your configuration.
8282
auto_refresh=True,
8383
native_frames_per_second=90,
8484
)
@@ -127,7 +127,7 @@
127127

128128

129129
# Setup the second bitmap and sparkline
130-
# mySparkline2 uses a vertical y range between 0 to 1, and will contain a
130+
# mySparkline2 uses a vertical y range between 0 to 1, and will contain a
131131
# maximum of 10 items
132132
#
133133
palette2 = displayio.Palette(1) # color palette used for bitmap2 (one color)
@@ -151,11 +151,11 @@
151151

152152
# Setup the third bitmap and third sparkline
153153
# mySparkline3 contains a maximum of 10 items
154-
# since yMin and yMax are not specified, mySparkline3 uses autoranging for both
154+
# since yMin and yMax are not specified, mySparkline3 uses autoranging for both
155155
# the top and bottom of the y-axis.
156-
# Note1: Any unspecified edge limit (yMin or yMax) will autorange that edge based
156+
# Note1: Any unspecified edge limit (yMin or yMax) will autorange that edge based
157157
# on the data in the list.
158-
# Note2: You can read back the value of the y-axis limits by using
158+
# Note2: You can read back the value of the y-axis limits by using
159159
# mySparkline3.yBottom or mySparkline3.yTop
160160

161161

@@ -197,8 +197,8 @@
197197
# Create a group to hold the three bitmap TileGrids and the three sparklines and
198198
# append them into the group (myGroup)
199199
#
200-
# Note: In cases where display elements will overlap, then the order the elements
201-
# are added to the group will set which is on top. Latter elements are displayed
200+
# Note: In cases where display elements will overlap, then the order the elements
201+
# are added to the group will set which is on top. Latter elements are displayed
202202
# on top of former elemtns.
203203
myGroup = displayio.Group(max_size=20)
204204

@@ -214,7 +214,7 @@
214214
myGroup.append(textLabel3a)
215215
myGroup.append(textLabel3b)
216216

217-
# Set the display to show myGroup that contains all the bitmap TileGrids and
217+
# Set the display to show myGroup that contains all the bitmap TileGrids and
218218
# sparklines
219219
display.show(myGroup)
220220

@@ -235,7 +235,7 @@
235235
# Note: For mySparkline2, the y-axis range is set from 0 to 1.
236236
# With the random values set between -1 and +2, the values will sometimes
237237
# be out of the y-range. This example shows how the fixed y-range (0 to 1)
238-
# will "clip" values (it will not display them) that are above or below the
238+
# will "clip" values (it will not display them) that are above or below the
239239
# y-range.
240240
mySparkline2.add_value(random.uniform(-1, 2))
241241

0 commit comments

Comments
 (0)