Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix typos again #764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

# Introduction

This code of conduct applies to all spaces managed by the fastplotlib project,
including all public and private mailing lists, issue trackers, wikis, blogs,
Twitter, and any other communication channel used by our community, including
any in-person events, whether directly organized by fastplotlib developers
or associated people.
This code of conduct applies to all spaces managed by the fastplotlib project,
including all public and private mailing lists, issue trackers, wikis, blogs,
Twitter, and any other communication channel used by our community, including
any in-person events, whether directly organized by fastplotlib developers
or associated people.

This code of conduct should be honored by everyone who participates in
the fastplotlib community formally or informally, or claims any affiliation with the
Expand Down Expand Up @@ -102,7 +102,7 @@ most appropriate). If you would prefer not to do that, please feel free to
report to the Code of Conduct committee directly, or ask the committee for
advice, in confidence.

You can report issues to the fastplotlib core team:
You can report issues to the fastplotlib core team:

[Kushal Kolar](https://github.com/kushalkolar)
[Caitlin Lewis](https://github.com/clewis7)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ git push origin my_feature_branch
> **_NOTE:_** If your contributions modify how visualizations _look_, see the [Testing details](#testing-details) section at the very bottom.

> **_NOTE:_** If your contributions modify the API, you must regenerate the API docs before making a PR, see
> the [Documenation](#documentation) section below.
> the [Documentation](#documentation) section below.

### Contributing your changes back to `fastplotlib`

Expand Down
2 changes: 1 addition & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Responsibilities:
1. Only individuals, not organizations, may be added to the leadership team. A candidate individual must be nominated by a current member of the leadership team.
2. A candidate must:
* Be committed to the fastplotlib mission.
* Have demonstrated contibutions to `fastplotlib` through one of:
* Have demonstrated contributions to `fastplotlib` through one of:
* Significant contributions to the codebase.
* Significant application of fastplotlib in a dependent package.
* Significant technical guidance or feedback on the development of `fastplotlib`.
Expand Down
1 change: 0 additions & 1 deletion docs/source/api/graphics/LineCollection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ Methods
LineCollection.rotate
LineCollection.share_property
LineCollection.unshare_property

1 change: 0 additions & 1 deletion docs/source/api/graphics/LineStack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ Methods
LineStack.rotate
LineStack.share_property
LineStack.unshare_property

2 changes: 1 addition & 1 deletion docs/source/user_guide/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ For more information on the various spaces used by rendering engines please see
Imgui
-----

Fastplotlib uses `imgui_bundle <https://github.com/pthom/imgui_bundle>`_ to provide within-canvas UI elemenents if you
Fastplotlib uses `imgui_bundle <https://github.com/pthom/imgui_bundle>`_ to provide within-canvas UI elements if you
installed ``fastplotlib`` using the ``imgui`` toggle, i.e. ``fastplotlib[imgui]``, or installed ``imgui_bundle`` afterwards.

Fastplotlib comes built-in with imgui UIs for subplot toolbars and a standard right-click menu with a number of options.
Expand Down
2 changes: 1 addition & 1 deletion examples/line/line_cmap_more.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# i.e., the color is a function of sine(x)
line2 = figure[0, 0].add_line(sine, thickness=10, cmap="jet", cmap_transform=sine[:, 1], offset=(0, 4, 0))

# make a line and change the cmap afterward, here we are using the cosine instead fot the transform
# make a line and change the cmap afterward, here we are using the cosine instead for the transform
line3 = figure[0, 0].add_line(sine, thickness=10, cmap="jet", cmap_transform=cosine[:, 1], offset=(0, 6, 0))
# change the cmap
line3.cmap = "bwr"
Expand Down
2 changes: 1 addition & 1 deletion examples/line_collection/line_collection_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Line Collection Colors
======================

Example showing one way ot setting colors for individual lines in a collection
Example showing one way of setting colors for individual lines in a collection
"""

# test_example = true
Expand Down
2 changes: 1 addition & 1 deletion examples/machine_learning/covariance.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
X = X.T
cov = X @ X.T / X.shape[1]

# reshaped image for each sample wil be 64 x 64 pixels
# reshaped image for each sample will be 64 x 64 pixels
img = cov[0].reshape(64, 64)

# figure kwargs for image widget
Expand Down
2 changes: 1 addition & 1 deletion examples/misc/em_wave_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

start, stop = 0, 4 * np.pi

# let's define the x, y and z axes for each with direction of wave propogation along the z-axis
# let's define the x, y and z axes for each with direction of wave propagation along the z-axis
# electric field in the xz plane travelling along
zs = np.linspace(start, stop, 200)
e_ys = np.zeros(200)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"fig[0, 0].add_image(data, name=\"image\")\n",
"\n",
"def update_frame(subplot):\n",
" # recieve bytes\n",
" # receive bytes\n",
" b = get_bytes()\n",
" \n",
" if b is not None:\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/notebooks/nb_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ def rgba_to_rgb(img: np.ndarray) -> np.ndarray:
def image_similarity(src, target, threshold=0.2):
"""Compute normalized RMSE 0..1 and decide if similar based on threshold.

For every pixel, the euclidian distance between RGB values is computed,
For every pixel, the euclidean distance between RGB values is computed,
and normalized by the maximum possible distance (between black and white).
The RMSE is then computed from those errors.

The normalized RMSE is used to compute the
similarity metric, so larger errors (euclidian distance
similarity metric, so larger errors (euclidean distance
between two RGB colors) will have a disproportionately
larger effect on the score than smaller errors.

Expand Down
6 changes: 3 additions & 3 deletions examples/notebooks/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@
"id": "c29f81f9-601b-49f4-b20c-575c56e58026",
"metadata": {},
"source": [
"## Graphic _data_ is also slicable and settable"
"## Graphic _data_ is also sliceable and settable"
]
},
{
Expand Down Expand Up @@ -1119,7 +1119,7 @@
"metadata": {},
"outputs": [],
"source": [
"# change the FOV of the persepctive camera\n",
"# change the FOV of the perspective camera\n",
"fig_l3d[0, 0].camera.fov = 70"
]
},
Expand Down Expand Up @@ -1197,7 +1197,7 @@
"\n",
"start, stop = 0, 4 * np.pi\n",
"\n",
"# let's define the x, y and z axes for each with direction of wave propogation along the z-axis\n",
"# let's define the x, y and z axes for each with direction of wave propagation along the z-axis\n",
"# electric field in the xz plane travelling along\n",
"zs = np.linspace(start, stop, 200)\n",
"e_ys = np.zeros(200)\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/selection_tools/unit_circle.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import fastplotlib as fpl


# helper function to make a cirlce
# helper function to make a circle
def make_circle(center, radius: float, n_points: int) -> np.ndarray:
theta = np.linspace(0, 2 * np.pi, n_points)
xs = radius * np.cos(theta)
Expand Down Expand Up @@ -52,7 +52,7 @@ def make_circle(center, radius: float, n_points: int) -> np.ndarray:
)

# line to show the circle radius
# use it to indicate the current position of the sine and cosine selctors (below)
# use it to indicate the current position of the sine and cosine selectors (below)
radius_data = np.array([[0, 0, 0], [*circle_data[0], 0]])
circle_radius = figure["unit circle"].add_line(
radius_data, thickness=6, colors="magenta"
Expand Down
8 changes: 4 additions & 4 deletions examples/tests/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ def find_examples(query=None, negative_query=None, return_stems=False):
def image_similarity(src, target, threshold=0.2):
"""Compute normalized RMSE 0..1 and decide if similar based on threshold.

For every pixel, the euclidian distance between RGB values is computed,
For every pixel, the euclidean distance between RGB values is computed,
and normalized by the maximum possible distance (between black and white).
The RMSE is then computed from those errors.

The normalized RMSE is used to compute the
similarity metric, so larger errors (euclidian distance
similarity metric, so larger errors (euclidean distance
between two RGB colors) will have a disproportionately
larger effect on the score than smaller errors.

Expand Down Expand Up @@ -227,11 +227,11 @@ def generate_diff(src, target, fuzz=0.05):
"""
Generate an image that
highlights the differences between src and target image
any pixels with a euclidian color distance < fuzz will be ignored
any pixels with a euclidean color distance < fuzz will be ignored
fuzz is expressed as a percentage of the maximum possible distance
which is the distance between (0,0,0) and (1,1,1) = sqrt(3).
"""
# compute euclidian distance between pixels
# compute euclidean distance between pixels
# and normalize to 0..1
max_dist = np.linalg.norm([1, 1, 1], axis=-1)
error = np.linalg.norm(np.abs(target - src), axis=-1) / max_dist
Expand Down
2 changes: 1 addition & 1 deletion fastplotlib/graphics/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def update_using_camera(self):
(xscreen_10, yscreen_10)
)
else:
# force origin since None is not supported for Persepctive projections
# force origin since None is not supported for Perspective projections
self._intersection = (0, 0, 0)
intersection = self._intersection

Expand Down
6 changes: 3 additions & 3 deletions fastplotlib/graphics/_collection_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ def rotations(self, values: np.ndarray | list[np.ndarray]):
# TODO: how to work with deleted feature in a collection

@property
def visibles(self) -> np.ndarray[bool]:
def visible(self) -> np.ndarray[bool]:
"""get or set the offsets of the individual graphics in the collection"""
return np.asarray([g.visible for g in self])

@visibles.setter
def visibles(self, values: np.ndarray[bool] | list[bool]):
@visible.setter
def visible(self, values: np.ndarray[bool] | list[bool]):
self._set_feature("visible", values)


Expand Down
2 changes: 1 addition & 1 deletion fastplotlib/graphics/_features/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class FeatureEvent(pygfx.Event):
+------------+-------------+-----------------------------------------------+
| target | WorldObject | pygfx rendering engine object for the graphic |
+------------+-------------+-----------------------------------------------+
| time_stamp | float | time when the event occured, in ms |
| time_stamp | float | time when the event occurred, in ms |
+------------+-------------+-----------------------------------------------+

"""
Expand Down
2 changes: 1 addition & 1 deletion fastplotlib/graphics/line_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def __init__(
names of the individual lines in the collection, ``len(names)`` must equal ``len(data)``

metadata: Any
meatadata associated with the collection as a whole
metadata associated with the collection as a whole

metadatas: Iterable or array
metadata for each individual line associated with this collection, this is for the user to manage.
Expand Down
2 changes: 1 addition & 1 deletion fastplotlib/graphics/selectors/_rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def get_selected_indices(
Returns
-------
Union[np.ndarray, List[np.ndarray]]
data indicies of the selection
data indices of the selection
| tuple of [row_indices, col_indices] if the graphic is an image
| list of indices along the x-dimension for each line if graphic is a line collection
| array of indices along the x-dimension if graphic is a line
Expand Down
2 changes: 1 addition & 1 deletion fastplotlib/layouts/_graphic_methods_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def add_line_collection(
names of the individual lines in the collection, ``len(names)`` must equal ``len(data)``

metadata: Any
meatadata associated with the collection as a whole
metadata associated with the collection as a whole

metadatas: Iterable or array
metadata for each individual line associated with this collection, this is for the user to manage.
Expand Down
2 changes: 1 addition & 1 deletion fastplotlib/tools/_histogram_lut.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(
----------
data
image_graphic
nbins: int, defaut 100.
nbins: int, default 100.
Total number of bins used in the histogram
flank_divisor: float, default 5.0.
Fraction of empty histogram bins on the tails of the distribution set `np.inf` for no flanks
Expand Down
2 changes: 1 addition & 1 deletion fastplotlib/ui/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __init__(
additional args for the GUI

**kwargs
additional kwargs for teh GUI
additional kwargs for the GUI
"""
super().__init__()

Expand Down
2 changes: 1 addition & 1 deletion fastplotlib/utils/_plot_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_nearest_graphics_indices(
) -> np.ndarray[int]:
"""
Returns indices of the nearest ``graphics`` to the passed position ``pos`` in world space
in order of closest to furtherst. Uses the distance between ``pos`` and the center of the
in order of closest to furthest. Uses the distance between ``pos`` and the center of the
bounding sphere for each graphic.

Parameters
Expand Down
10 changes: 5 additions & 5 deletions fastplotlib/utils/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ def _notebook_print_banner():
device = adapter["device"]

if atype in ("DiscreteGPU", "IntegratedGPU") and backend != "OpenGL":
charactor = chr(0x2705) # green checkmark
character = chr(0x2705) # green checkmark
tooltip = "This adapter can be used with fastplotlib"
elif backend == "OpenGL":
charactor = chr(0x0000274C) # red x
character = chr(0x0000274C) # red x
tooltip = "This adapter cannot be used with fastplotlib"
elif device.startswith("llvmpipe") or atype == "CPU":
charactor = f"{chr(0x00002757)} limited" # red !
character = f"{chr(0x00002757)} limited" # red !
tooltip = "CPU rendering support is limited and mainly for testing purposes"
else:
charactor = f"{chr(0x00002757)} unknown" # red !
character = f"{chr(0x00002757)} unknown" # red !
tooltip = "Unknown adapter type and backend"

if ix == default_ix:
Expand All @@ -109,7 +109,7 @@ def _notebook_print_banner():
# add row to HTML table
table_str += f'<tr title="{tooltip}">'
# add each element to this row
for s in [f"{charactor}{default}", device, atype, backend, driver]:
for s in [f"{character}{default}", device, atype, backend, driver]:
table_str += f"<td>{s}</td>"
table_str += "</tr>"

Expand Down
Loading