Skip to content

Commit 0693e3c

Browse files
committed
cartesian name change
1 parent 8fc78d5 commit 0693e3c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+99
-99
lines changed

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class-rgx=[A-Z_][a-zA-Z0-9_]+$
8080
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
8181
docstring-min-length=-1
8282
function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
83-
good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_,cs,TVOC,bar,rx,ry,x0,y0,y1,x1,logging,fillbetween,ucartesian,y2,map,pie,shade
83+
good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_,cs,TVOC,bar,rx,ry,x0,y0,y1,x1,logging,fillbetween,cartesian,y2,map,pie,shade
8484
include-naming-hint=no
8585
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
8686
method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

circuitpython_uplot/bar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""
1616

1717
try:
18-
from circuitpython_uplot.uplot import Uplot
18+
from circuitpython_uplot.plot import Plot
1919
except ImportError:
2020
pass
2121
from math import sin, cos, ceil
@@ -37,7 +37,7 @@ class Bar:
3737

3838
def __init__(
3939
self,
40-
plot: Uplot,
40+
plot: Plot,
4141
x: list,
4242
y: list,
4343
color: int = 0xFFFFFF,
@@ -49,7 +49,7 @@ def __init__(
4949
max_value=None,
5050
) -> None:
5151
"""
52-
:param Uplot plot: Plot object for the scatter to be drawn
52+
:param Plot plot: Plot object for the scatter to be drawn
5353
:param list x: x data
5454
:param list y: y data
5555
:param int color: boxes color. Defaults to const:``0xFFFFFF``
@@ -233,7 +233,7 @@ def _create_projections(self, xstart: int, indice: int, color_lenght: int):
233233
)
234234

235235
def _draw_rectangle(
236-
self, plot: Uplot, x: int, y: int, width: int, height: int, color: int
236+
self, plot: Plot, x: int, y: int, width: int, height: int, color: int
237237
) -> None:
238238
"""
239239
Helper function to draw bins rectangles

circuitpython_uplot/ucartesian.py renamed to circuitpython_uplot/cartesian.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
"""
66
7-
`ucartesian`
7+
`cartesian`
88
================================================================================
99
1010
CircuitPython cartesian graph
@@ -15,7 +15,7 @@
1515
"""
1616
try:
1717
from typing import Optional, Union
18-
from circuitpython_uplot.uplot import Uplot
18+
from circuitpython_uplot.plot import Uplot
1919
except ImportError:
2020
pass
2121
from bitmaptools import draw_line, fill_region
@@ -26,7 +26,7 @@
2626
__repo__ = "https://github.com/adafruit/CircuitPython_uplot.git"
2727

2828

29-
class ucartesian:
29+
class Cartesian:
3030
"""
3131
Class to draw cartesian plane
3232
"""

circuitpython_uplot/fillbetween.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""
1616
try:
1717
from typing import Optional, Union
18-
from circuitpython_uplot.uplot import Uplot
18+
from circuitpython_uplot.plot import Uplot
1919
except ImportError:
2020
pass
2121
from ulab import numpy as np

circuitpython_uplot/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""
1616
try:
1717
from typing import Union
18-
from circuitpython_uplot.uplot import Uplot
18+
from circuitpython_uplot.plot import Uplot
1919
except ImportError:
2020
pass
2121
from bitmaptools import draw_line, fill_region

circuitpython_uplot/map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
"""
1717
try:
18-
from circuitpython_uplot.uplot import Uplot
18+
from circuitpython_uplot.plot import Uplot
1919
except ImportError:
2020
pass
2121

circuitpython_uplot/pie.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
"""
1616
try:
17-
from circuitpython_uplot.uplot import Uplot
17+
from circuitpython_uplot.plot import Uplot
1818
except ImportError:
1919
pass
2020

circuitpython_uplot/uplot.py renamed to circuitpython_uplot/plot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
"""
66
7-
`uplot`
7+
`plot`
88
================================================================================
99
1010
CircuitPython Plot Class
@@ -41,7 +41,7 @@
4141
__repo__ = "https://github.com/jposada202020/CircuitPython_uplot.git"
4242

4343

44-
class Uplot(displayio.Group):
44+
class Plot(displayio.Group):
4545
"""
4646
Canvas Class to add different elements to the screen.
4747
The origin point set by ``x`` and ``y`` properties

circuitpython_uplot/polar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""
1616
try:
1717
from typing import Optional, Union
18-
from circuitpython_uplot.uplot import Uplot
18+
from circuitpython_uplot.plot import Uplot
1919
except ImportError:
2020
pass
2121
from bitmaptools import draw_line, draw_circle

circuitpython_uplot/scatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"""
1717
try:
1818
from typing import Optional, Union
19-
from circuitpython_uplot.uplot import Uplot
19+
from circuitpython_uplot.plot import Uplot
2020
except ImportError:
2121
pass
2222

circuitpython_uplot/shade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""
1616
try:
1717
from typing import Optional, Union
18-
from circuitpython_uplot.uplot import Uplot
18+
from circuitpython_uplot.plot import Uplot
1919
except ImportError:
2020
pass
2121
from ulab import numpy as np

circuitpython_uplot/svg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
"""
1616
try:
17-
from circuitpython_uplot.uplot import Uplot
17+
from circuitpython_uplot.plot import Uplot
1818
except ImportError:
1919
pass
2020
from bitmaptools import draw_line

docs/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Uplot Library
1313
.. automodule:: circuitpython_uplot.pie
1414
:members:
1515

16-
.. automodule:: circuitpython_uplot.ucartesian
16+
.. automodule:: circuitpython_uplot.cartesian
1717
:members:
1818

1919
.. automodule:: circuitpython_uplot.fillbetween

docs/examples.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,18 @@ Cartesian Advanced Example
137137

138138
Showing the ability to display to graphs in the same plot with different colors
139139

140-
.. literalinclude:: ../examples/uplot_ucartesian_advanced.py
141-
:caption: examples/uplot_ucartesian_advanced.py
140+
.. literalinclude:: ../examples/uplot_cartesian_advanced.py
141+
:caption: examples/uplot_cartesian_advanced.py
142142
:lines: 5-
143-
.. image:: ../docs/uplot_ex11.jpg
143+
.. image:: ../docs/uplot_cartesian_advance.jpg
144144

145145
Cartesian Table Example
146146
---------------------------
147147

148148
Example showing how to add a data table to the plot
149149

150-
.. literalinclude:: ../examples/uplot_ucartesian_table.py
151-
:caption: examples/uplot_ucartesian_table.py
150+
.. literalinclude:: ../examples/uplot_cartesian_table.py
151+
:caption: examples/uplot_cartesian_table.py
152152
:lines: 5-
153153

154154
Lissajous Curves Example
@@ -235,8 +235,8 @@ Cartesian Animation Example
235235

236236
Cartesian animation example
237237

238-
.. literalinclude:: ../examples/uplot_ucartesian_loggin_data.py
239-
:caption: examples/uplot_ucartesian_loggin_data.py
238+
.. literalinclude:: ../examples/uplot_cartesian_loggin_data.py
239+
:caption: examples/uplot_cartesian_loggin_data.py
240240
:lines: 5-
241241
.. image:: ../docs/uplot_cartesian.gif
242242

docs/quick_start.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ to the `ulab` library
172172
173173
from ulab import numpy as np
174174
from circuitpython_uplot.uplot import Uplot
175-
from circuitpython_uplot.ucartesian import ucartesian
175+
from circuitpython_uplot.cartesian import Cartesian
176176
display = board.DISPLAY
177177
plot = Uplot(0, 0, display.width, display.height)
178178
@@ -184,7 +184,7 @@ After the initial setup we add our xy plane and show our plot
184184

185185
.. code-block:: python
186186
187-
ucartesian(plot, x, y)
187+
Cartesian(plot, x, y)
188188
display.show(plot)
189189
190190
@@ -203,7 +203,7 @@ the y axis to [0, 1], line color to Green :const:`0x00FF00` and no filling
203203
x = np.linspace(-3, 3, num=50)
204204
constant = 2.0 / np.sqrt(2 * np.pi)
205205
y = constant * np.exp((-(x**2)) / 2.0)
206-
ucartesian(plot, x, y, rangex=[-5, 5], rangey=[0, 1], line_color=0x00FF00)
206+
Cartesian(plot, x, y, rangex=[-5, 5], rangey=[0, 1], line_color=0x00FF00)
207207
208208
209209
if you want to add more than un line to your plot, you could do something like this:
@@ -214,8 +214,8 @@ if you want to add more than un line to your plot, you could do something like t
214214
x = np.linspace(-4, 4, num=25)
215215
y1 = x**2 / 2
216216
y2 = 2 + x**2 + 3 * x
217-
ucartesian(plot, x, y1)
218-
ucartesian(plot, x, y1)
217+
Cartesian(plot, x, y1)
218+
Cartesian(plot, x, y1)
219219
display.show(plot)
220220
221221
File renamed without changes.

examples/uplot_bar_3Dbars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import time
66
import board
7-
from circuitpython_uplot.uplot import Uplot
7+
from circuitpython_uplot.plot import Uplot
88
from circuitpython_uplot.bar import Bar
99

1010

examples/uplot_bar_color_changing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import time
66
import board
7-
from circuitpython_uplot.uplot import Uplot, color
7+
from circuitpython_uplot.plot import Uplot, color
88
from circuitpython_uplot.bar import Bar
99

1010
# Setting up the display

examples/uplot_bar_colorpalette.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: MIT
44

55
import board
6-
from circuitpython_uplot.uplot import Uplot, color
6+
from circuitpython_uplot.plot import Uplot, color
77
from circuitpython_uplot.bar import Bar
88

99
# Setting up the display

examples/uplot_bar_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import time
66
import board
7-
from circuitpython_uplot.uplot import Uplot
7+
from circuitpython_uplot.plot import Uplot
88
from circuitpython_uplot.bar import Bar
99

1010

examples/uplot_bar_scale_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import time
66
import board
77
import displayio
8-
from circuitpython_uplot.uplot import Uplot
8+
from circuitpython_uplot.plot import Uplot
99
from circuitpython_uplot.bar import Bar
1010

1111
# from uplot_examples import u8

examples/uplot_bar_updating_values.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import time
66
import board
7-
from circuitpython_uplot.uplot import Uplot, color
7+
from circuitpython_uplot.plot import Uplot, color
88
from circuitpython_uplot.bar import Bar
99

1010
# Setting up the display

examples/uplot_ucartesian_advanced.py renamed to examples/uplot_cartesian_advanced.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import time
66
import board
77
from ulab import numpy as np
8-
from circuitpython_uplot.uplot import Uplot
9-
from circuitpython_uplot.ucartesian import ucartesian
8+
from circuitpython_uplot.plot import Uplot
9+
from circuitpython_uplot.cartesian import Cartesian
1010

1111
# Setting up the display
1212
display = board.DISPLAY
@@ -18,13 +18,13 @@
1818
y = constant * np.exp((-(x**2)) / 2.0)
1919

2020
# Drawing the graph
21-
ucartesian(plot, x, y, rangex=[-5, 5], rangey=[0, 1], line_color=0xFF0000)
21+
Cartesian(plot, x, y, rangex=[-5, 5], rangey=[0, 1], line_color=0xFF0000)
2222

2323
# Creating some points to graph
2424
x = np.linspace(-3, 3, num=50)
2525
constant = 2.0 / np.sqrt(2 * np.pi)
2626
y = constant * np.exp((-(x**2)) / 2.0)
27-
ucartesian(plot, x, y, rangex=[-5, 5], rangey=[0, 1], line_color=0x00FF00)
27+
Cartesian(plot, x, y, rangex=[-5, 5], rangey=[0, 1], line_color=0x00FF00)
2828

2929
# Plotting and showing the plot
3030
display.show(plot)

examples/uplot_ucartesian_loggin_data.py renamed to examples/uplot_cartesian_loggin_data.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import terminalio
99
import board
1010
from adafruit_display_text import label
11-
from circuitpython_uplot.uplot import Uplot, color
12-
from circuitpython_uplot.ucartesian import ucartesian
11+
from circuitpython_uplot.plot import Uplot, color
12+
from circuitpython_uplot.cartesian import Cartesian
1313

1414
# Setting up the display
1515
display = board.DISPLAY
@@ -83,7 +83,7 @@
8383
display.refresh()
8484

8585
for i, element in enumerate(x):
86-
ucartesian(
86+
Cartesian(
8787
plot_1,
8888
x[0:i],
8989
temp_y[0:i],
@@ -93,7 +93,7 @@
9393
line_color=color.BLACK,
9494
logging=True,
9595
)
96-
ucartesian(
96+
Cartesian(
9797
plot_2,
9898
x[0:i],
9999
humidity_y[0:i],

examples/uplot_ucartesian_table.py renamed to examples/uplot_cartesian_table.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import board
77
from ulab import numpy as np
88
from table import Table
9-
from circuitpython_uplot.uplot import Uplot, color
10-
from circuitpython_uplot.ucartesian import ucartesian
9+
from circuitpython_uplot.plot import Uplot, color
10+
from circuitpython_uplot.cartesian import Cartesian
1111
from circuitpython_uplot.shade import shade
1212

1313

@@ -101,7 +101,7 @@ def heat_index(temp, humidity):
101101

102102
# Drawing the graphs
103103
for i in range(40, 110, 10):
104-
ucartesian(plot, x, heat_index(x, i), rangex=[25, 50], rangey=[25, 60])
104+
Cartesian(plot, x, heat_index(x, i), rangex=[25, 50], rangey=[25, 60])
105105

106106
g.append(plot)
107107

examples/uplot_display_shapes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import board
77
from adafruit_display_shapes.polygon import Polygon
88
from adafruit_display_shapes.roundrect import RoundRect
9-
from circuitpython_uplot.uplot import Uplot
9+
from circuitpython_uplot.plot import Uplot
1010

1111
# Setting up the display
1212
display = board.DISPLAY

examples/uplot_fillbetween.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import time
66
import board
77
from ulab import numpy as np
8-
from circuitpython_uplot.uplot import Uplot
8+
from circuitpython_uplot.plot import Uplot
99
from circuitpython_uplot.fillbetween import Fillbetween
1010

1111

0 commit comments

Comments
 (0)