Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9157048

Browse filesBrowse files
committed
Merge branch 'graphic-features-refactor' of https://github.com/fastplotlib/fastplotlib into graphic-features-refactor
2 parents 3a424d2 + d785b92 commit 9157048
Copy full SHA for 9157048

File tree

Expand file treeCollapse file tree

3 files changed

+5
-3
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+5
-3
lines changed

‎examples/desktop/line/line_cmap.py

Copy file name to clipboardExpand all lines: examples/desktop/line/line_cmap.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
data=cosine,
3636
thickness=10,
3737
cmap="tab10",
38-
cmap_values=np.array(cmap_values)
38+
cmap_values=cmap_values
3939
)
4040

4141
fig.show()

‎examples/desktop/line/line_dataslice.py

Copy file name to clipboardExpand all lines: examples/desktop/line/line_dataslice.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
cosine_graphic.data[0] = np.array([[-10, 0, 0]])
4343

4444
# additional fancy indexing using numpy
45-
key2 = np.array([True, False, True, False, True, True, True, True])
45+
key2 = [True, False] * 50
4646
sinc_graphic.data[key2] = np.array([[5, 1, 2]])
4747

4848
fig.canvas.set_logical_size(800, 800)

‎fastplotlib/graphics/_features/_positions_graphics.py

Copy file name to clipboardExpand all lines: fastplotlib/graphics/_features/_positions_graphics.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any
1+
from typing import Any, List
22

33
import numpy as np
44
import pygfx
@@ -330,6 +330,8 @@ def __init__(
330330
if not isinstance(self._cmap_name, str):
331331
raise TypeError
332332
if self._cmap_values is not None:
333+
if isinstance(self._cmap_values, List):
334+
self._cmap_values = np.asarray(self._cmap_values)
333335
if not isinstance(self._cmap_values, np.ndarray):
334336
raise TypeError
335337

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.