diff --git a/docs/source/api/graphic_features/Alpha.rst b/docs/source/api/graphic_features/Alpha.rst new file mode 100644 index 000000000..1ee1f66ac --- /dev/null +++ b/docs/source/api/graphic_features/Alpha.rst @@ -0,0 +1,35 @@ +.. _api.Alpha: + +Alpha +***** + +===== +Alpha +===== +.. currentmodule:: fastplotlib.graphics.features + +Constructor +~~~~~~~~~~~ +.. autosummary:: + :toctree: Alpha_api + + Alpha + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: Alpha_api + + Alpha.value + +Methods +~~~~~~~ +.. autosummary:: + :toctree: Alpha_api + + Alpha.add_event_handler + Alpha.block_events + Alpha.clear_event_handlers + Alpha.remove_event_handler + Alpha.set_value + diff --git a/docs/source/api/graphic_features/AlphaMode.rst b/docs/source/api/graphic_features/AlphaMode.rst new file mode 100644 index 000000000..40e58195c --- /dev/null +++ b/docs/source/api/graphic_features/AlphaMode.rst @@ -0,0 +1,35 @@ +.. _api.AlphaMode: + +AlphaMode +********* + +========= +AlphaMode +========= +.. currentmodule:: fastplotlib.graphics.features + +Constructor +~~~~~~~~~~~ +.. autosummary:: + :toctree: AlphaMode_api + + AlphaMode + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: AlphaMode_api + + AlphaMode.value + +Methods +~~~~~~~ +.. autosummary:: + :toctree: AlphaMode_api + + AlphaMode.add_event_handler + AlphaMode.block_events + AlphaMode.clear_event_handlers + AlphaMode.remove_event_handler + AlphaMode.set_value + diff --git a/docs/source/api/graphic_features/VertexCmap.rst b/docs/source/api/graphic_features/VertexCmap.rst index 77d96aaf6..fd1013620 100644 --- a/docs/source/api/graphic_features/VertexCmap.rst +++ b/docs/source/api/graphic_features/VertexCmap.rst @@ -20,7 +20,6 @@ Properties .. autosummary:: :toctree: VertexCmap_api - VertexCmap.alpha VertexCmap.buffer VertexCmap.name VertexCmap.shared diff --git a/docs/source/api/graphic_features/index.rst b/docs/source/api/graphic_features/index.rst index 90a58fe8e..578d62b45 100644 --- a/docs/source/api/graphic_features/index.rst +++ b/docs/source/api/graphic_features/index.rst @@ -29,6 +29,8 @@ Graphic Features Name Offset Rotation + Alpha + AlphaMode Visible Deleted GraphicFeatureEvent diff --git a/docs/source/api/graphics/Graphic.rst b/docs/source/api/graphics/Graphic.rst index cf68888f5..da6424e3e 100644 --- a/docs/source/api/graphics/Graphic.rst +++ b/docs/source/api/graphics/Graphic.rst @@ -20,6 +20,8 @@ Properties .. autosummary:: :toctree: Graphic_api + Graphic.alpha + Graphic.alpha_mode Graphic.axes Graphic.block_events Graphic.deleted diff --git a/docs/source/api/graphics/ImageGraphic.rst b/docs/source/api/graphics/ImageGraphic.rst index c7572aed5..457ba27ee 100644 --- a/docs/source/api/graphics/ImageGraphic.rst +++ b/docs/source/api/graphics/ImageGraphic.rst @@ -20,6 +20,8 @@ Properties .. autosummary:: :toctree: ImageGraphic_api + ImageGraphic.alpha + ImageGraphic.alpha_mode ImageGraphic.axes ImageGraphic.block_events ImageGraphic.cmap @@ -47,8 +49,8 @@ Methods ImageGraphic.add_event_handler ImageGraphic.add_linear_region_selector ImageGraphic.add_linear_selector - ImageGraphic.add_rectangle_selector ImageGraphic.add_polygon_selector + ImageGraphic.add_rectangle_selector ImageGraphic.clear_event_handlers ImageGraphic.remove_event_handler ImageGraphic.reset_vmin_vmax diff --git a/docs/source/api/graphics/LineCollection.rst b/docs/source/api/graphics/LineCollection.rst index 15403927e..ffbb52f2b 100644 --- a/docs/source/api/graphics/LineCollection.rst +++ b/docs/source/api/graphics/LineCollection.rst @@ -20,6 +20,8 @@ Properties .. autosummary:: :toctree: LineCollection_api + LineCollection.alpha + LineCollection.alpha_mode LineCollection.axes LineCollection.block_events LineCollection.cmap @@ -52,8 +54,8 @@ Methods LineCollection.add_graphic LineCollection.add_linear_region_selector LineCollection.add_linear_selector - LineCollection.add_rectangle_selector LineCollection.add_polygon_selector + LineCollection.add_rectangle_selector LineCollection.clear_event_handlers LineCollection.remove_event_handler LineCollection.remove_graphic diff --git a/docs/source/api/graphics/LineGraphic.rst b/docs/source/api/graphics/LineGraphic.rst index 6ea799594..ddcb00c41 100644 --- a/docs/source/api/graphics/LineGraphic.rst +++ b/docs/source/api/graphics/LineGraphic.rst @@ -20,6 +20,8 @@ Properties .. autosummary:: :toctree: LineGraphic_api + LineGraphic.alpha + LineGraphic.alpha_mode LineGraphic.axes LineGraphic.block_events LineGraphic.cmap @@ -46,8 +48,8 @@ Methods LineGraphic.add_event_handler LineGraphic.add_linear_region_selector LineGraphic.add_linear_selector - LineGraphic.add_rectangle_selector LineGraphic.add_polygon_selector + LineGraphic.add_rectangle_selector LineGraphic.clear_event_handlers LineGraphic.remove_event_handler LineGraphic.rotate diff --git a/docs/source/api/graphics/LineStack.rst b/docs/source/api/graphics/LineStack.rst index dbb8fc454..4373454be 100644 --- a/docs/source/api/graphics/LineStack.rst +++ b/docs/source/api/graphics/LineStack.rst @@ -20,6 +20,8 @@ Properties .. autosummary:: :toctree: LineStack_api + LineStack.alpha + LineStack.alpha_mode LineStack.axes LineStack.block_events LineStack.cmap @@ -52,8 +54,8 @@ Methods LineStack.add_graphic LineStack.add_linear_region_selector LineStack.add_linear_selector - LineStack.add_rectangle_selector LineStack.add_polygon_selector + LineStack.add_rectangle_selector LineStack.clear_event_handlers LineStack.remove_event_handler LineStack.remove_graphic diff --git a/docs/source/api/graphics/ScatterGraphic.rst b/docs/source/api/graphics/ScatterGraphic.rst index 968f0e091..48d30d01f 100644 --- a/docs/source/api/graphics/ScatterGraphic.rst +++ b/docs/source/api/graphics/ScatterGraphic.rst @@ -20,6 +20,8 @@ Properties .. autosummary:: :toctree: ScatterGraphic_api + ScatterGraphic.alpha + ScatterGraphic.alpha_mode ScatterGraphic.axes ScatterGraphic.block_events ScatterGraphic.cmap diff --git a/docs/source/api/graphics/TextGraphic.rst b/docs/source/api/graphics/TextGraphic.rst index 60cd97f40..0de52942b 100644 --- a/docs/source/api/graphics/TextGraphic.rst +++ b/docs/source/api/graphics/TextGraphic.rst @@ -20,6 +20,8 @@ Properties .. autosummary:: :toctree: TextGraphic_api + TextGraphic.alpha + TextGraphic.alpha_mode TextGraphic.axes TextGraphic.block_events TextGraphic.deleted diff --git a/docs/source/api/layouts/imgui_figure.rst b/docs/source/api/layouts/imgui_figure.rst index 0abfcc067..e1922a9f4 100644 --- a/docs/source/api/layouts/imgui_figure.rst +++ b/docs/source/api/layouts/imgui_figure.rst @@ -23,6 +23,7 @@ Properties ImguiFigure.cameras ImguiFigure.canvas ImguiFigure.controllers + ImguiFigure.default_imgui_font ImguiFigure.guis ImguiFigure.imgui_renderer ImguiFigure.layout diff --git a/docs/source/api/selectors/LinearRegionSelector.rst b/docs/source/api/selectors/LinearRegionSelector.rst index 2c23bc82a..35b5ae1f4 100644 --- a/docs/source/api/selectors/LinearRegionSelector.rst +++ b/docs/source/api/selectors/LinearRegionSelector.rst @@ -20,6 +20,8 @@ Properties .. autosummary:: :toctree: LinearRegionSelector_api + LinearRegionSelector.alpha + LinearRegionSelector.alpha_mode LinearRegionSelector.axes LinearRegionSelector.axis LinearRegionSelector.block_events diff --git a/docs/source/api/selectors/LinearSelector.rst b/docs/source/api/selectors/LinearSelector.rst index c7a8e978a..9cbe6fb26 100644 --- a/docs/source/api/selectors/LinearSelector.rst +++ b/docs/source/api/selectors/LinearSelector.rst @@ -20,6 +20,8 @@ Properties .. autosummary:: :toctree: LinearSelector_api + LinearSelector.alpha + LinearSelector.alpha_mode LinearSelector.axes LinearSelector.axis LinearSelector.block_events diff --git a/docs/source/api/selectors/RectangleSelector.rst b/docs/source/api/selectors/RectangleSelector.rst index 24928c817..dc9727069 100644 --- a/docs/source/api/selectors/RectangleSelector.rst +++ b/docs/source/api/selectors/RectangleSelector.rst @@ -20,6 +20,8 @@ Properties .. autosummary:: :toctree: RectangleSelector_api + RectangleSelector.alpha + RectangleSelector.alpha_mode RectangleSelector.axes RectangleSelector.axis RectangleSelector.block_events diff --git a/docs/source/api/tools/HistogramLUTTool.rst b/docs/source/api/tools/HistogramLUTTool.rst index 7c3237490..128dbb889 100644 --- a/docs/source/api/tools/HistogramLUTTool.rst +++ b/docs/source/api/tools/HistogramLUTTool.rst @@ -20,6 +20,8 @@ Properties .. autosummary:: :toctree: HistogramLUTTool_api + HistogramLUTTool.alpha + HistogramLUTTool.alpha_mode HistogramLUTTool.axes HistogramLUTTool.block_events HistogramLUTTool.cmap diff --git a/docs/source/conf.py b/docs/source/conf.py index e4ff72237..59d0a2885 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -126,6 +126,7 @@ autodoc_typehints = "description" autodoc_typehints_description_target = "documented_params" +autodoc_preserve_defaults = True intersphinx_mapping = { "python": ("https://docs.python.org/3", None), diff --git a/docs/source/user_guide/event_tables.rst b/docs/source/user_guide/event_tables.rst index 1b9b2f7ec..0ae9e974d 100644 --- a/docs/source/user_guide/event_tables.rst +++ b/docs/source/user_guide/event_tables.rst @@ -113,6 +113,28 @@ rotation | value | np.ndarray[float, float, float, float] | new rotation quaternion | +----------+----------------------------------------+-------------------------+ +alpha +^^^^^ + +**event info dict** + ++----------+-------+-----------------+ +| dict key | type | description | ++==========+=======+=================+ +| value | float | new alpha value | ++----------+-------+-----------------+ + +alpha_mode +^^^^^^^^^^ + +**event info dict** + ++----------+------+----------------+ +| dict key | type | description | ++==========+======+================+ +| value | str | new alpha mode | ++----------+------+----------------+ + visible ^^^^^^^ @@ -258,6 +280,28 @@ rotation | value | np.ndarray[float, float, float, float] | new rotation quaternion | +----------+----------------------------------------+-------------------------+ +alpha +^^^^^ + +**event info dict** + ++----------+-------+-----------------+ +| dict key | type | description | ++==========+=======+=================+ +| value | float | new alpha value | ++----------+-------+-----------------+ + +alpha_mode +^^^^^^^^^^ + +**event info dict** + ++----------+------+----------------+ +| dict key | type | description | ++==========+======+================+ +| value | str | new alpha mode | ++----------+------+----------------+ + visible ^^^^^^^ @@ -384,6 +428,28 @@ rotation | value | np.ndarray[float, float, float, float] | new rotation quaternion | +----------+----------------------------------------+-------------------------+ +alpha +^^^^^ + +**event info dict** + ++----------+-------+-----------------+ +| dict key | type | description | ++==========+=======+=================+ +| value | float | new alpha value | ++----------+-------+-----------------+ + +alpha_mode +^^^^^^^^^^ + +**event info dict** + ++----------+------+----------------+ +| dict key | type | description | ++==========+======+================+ +| value | str | new alpha mode | ++----------+------+----------------+ + visible ^^^^^^^ @@ -497,6 +563,28 @@ rotation | value | np.ndarray[float, float, float, float] | new rotation quaternion | +----------+----------------------------------------+-------------------------+ +alpha +^^^^^ + +**event info dict** + ++----------+-------+-----------------+ +| dict key | type | description | ++==========+=======+=================+ +| value | float | new alpha value | ++----------+-------+-----------------+ + +alpha_mode +^^^^^^^^^^ + +**event info dict** + ++----------+------+----------------+ +| dict key | type | description | ++==========+======+================+ +| value | str | new alpha mode | ++----------+------+----------------+ + visible ^^^^^^^ @@ -629,6 +717,28 @@ rotation | value | np.ndarray[float, float, float, float] | new rotation quaternion | +----------+----------------------------------------+-------------------------+ +alpha +^^^^^ + +**event info dict** + ++----------+-------+-----------------+ +| dict key | type | description | ++==========+=======+=================+ +| value | float | new alpha value | ++----------+-------+-----------------+ + +alpha_mode +^^^^^^^^^^ + +**event info dict** + ++----------+------+----------------+ +| dict key | type | description | ++==========+======+================+ +| value | str | new alpha mode | ++----------+------+----------------+ + visible ^^^^^^^ @@ -761,6 +871,28 @@ rotation | value | np.ndarray[float, float, float, float] | new rotation quaternion | +----------+----------------------------------------+-------------------------+ +alpha +^^^^^ + +**event info dict** + ++----------+-------+-----------------+ +| dict key | type | description | ++==========+=======+=================+ +| value | float | new alpha value | ++----------+-------+-----------------+ + +alpha_mode +^^^^^^^^^^ + +**event info dict** + ++----------+------+----------------+ +| dict key | type | description | ++==========+======+================+ +| value | str | new alpha mode | ++----------+------+----------------+ + visible ^^^^^^^ @@ -838,6 +970,28 @@ rotation | value | np.ndarray[float, float, float, float] | new rotation quaternion | +----------+----------------------------------------+-------------------------+ +alpha +^^^^^ + +**event info dict** + ++----------+-------+-----------------+ +| dict key | type | description | ++==========+=======+=================+ +| value | float | new alpha value | ++----------+-------+-----------------+ + +alpha_mode +^^^^^^^^^^ + +**event info dict** + ++----------+------+----------------+ +| dict key | type | description | ++==========+======+================+ +| value | str | new alpha mode | ++----------+------+----------------+ + visible ^^^^^^^ @@ -917,6 +1071,28 @@ rotation | value | np.ndarray[float, float, float, float] | new rotation quaternion | +----------+----------------------------------------+-------------------------+ +alpha +^^^^^ + +**event info dict** + ++----------+-------+-----------------+ +| dict key | type | description | ++==========+=======+=================+ +| value | float | new alpha value | ++----------+-------+-----------------+ + +alpha_mode +^^^^^^^^^^ + +**event info dict** + ++----------+------+----------------+ +| dict key | type | description | ++==========+======+================+ +| value | str | new alpha mode | ++----------+------+----------------+ + visible ^^^^^^^ @@ -996,6 +1172,28 @@ rotation | value | np.ndarray[float, float, float, float] | new rotation quaternion | +----------+----------------------------------------+-------------------------+ +alpha +^^^^^ + +**event info dict** + ++----------+-------+-----------------+ +| dict key | type | description | ++==========+=======+=================+ +| value | float | new alpha value | ++----------+-------+-----------------+ + +alpha_mode +^^^^^^^^^^ + +**event info dict** + ++----------+------+----------------+ +| dict key | type | description | ++==========+======+================+ +| value | str | new alpha mode | ++----------+------+----------------+ + visible ^^^^^^^ diff --git a/examples/events/scatter_hover_transforms.py b/examples/events/scatter_hover_transforms.py index 18e6f3de5..f7b733109 100644 --- a/examples/events/scatter_hover_transforms.py +++ b/examples/events/scatter_hover_transforms.py @@ -13,9 +13,9 @@ # test_example = false # sphinx_gallery_pygfx_docs = 'screenshot' -from sklearn.datasets import fetch_california_housing +from sklearn.datasets import load_diabetes from sklearn.preprocessing import ( - Normalizer, + StandardScaler, QuantileTransformer, PowerTransformer, ) @@ -24,30 +24,16 @@ import pygfx # get the dataset -dataset = fetch_california_housing(n_retries=5, delay=20) -X_full, y = dataset.data, dataset.target -feature_names = dataset.feature_names - -feature_mapping = { - "MedInc": "Median income in block", - "HouseAge": "Median house age in block", - "AveRooms": "Average number of rooms", - "AveBedrms": "Average number of bedrooms", - "Population": "Block population", - "AveOccup": "Average house occupancy", - "Latitude": "House block latitude", - "Longitude": "House block longitude", -} +dataset = load_diabetes(scaled=False) + # Take only 2 features to make visualization easier -# Feature MedInc has a long tail distribution. -# Feature AveOccup has a few but very large outliers. -features = ["MedInc", "AveOccup"] -features_idx = [feature_names.index(feature) for feature in features] -X = X_full[:, features_idx] +X = dataset["data"][:, (2, 6)] +# target +y = dataset["target"] # list of our scalers and their names as strings -scalers = [PowerTransformer, QuantileTransformer, Normalizer] +scalers = [PowerTransformer, QuantileTransformer, StandardScaler] names = ["Original Data", *[s.__name__ for s in scalers]] # fastplotlib code starts here, make a figure diff --git a/examples/gridplot/multigraphic_gridplot.py b/examples/gridplot/multigraphic_gridplot.py index dad7ee192..cbf546e2a 100644 --- a/examples/gridplot/multigraphic_gridplot.py +++ b/examples/gridplot/multigraphic_gridplot.py @@ -17,7 +17,7 @@ figure = fpl.Figure( shape=(2, 2), names=[["image-overlay", "circles"], ["line-stack", "scatter"]], - size=(700, 560) + size=(700, 560), ) img = iio.imread("imageio:coffee.png") @@ -36,6 +36,7 @@ # add overlay to image figure["image-overlay"].add_image(data=overlay) + # generate some circles def make_circle(center, radius: float, n_points: int = 75) -> np.ndarray: theta = np.linspace(0, 2 * np.pi, n_points) @@ -55,10 +56,10 @@ def make_circle(center, radius: float, n_points: int = 75) -> np.ndarray: # things like class labels, cluster labels, etc. cmap_transform = [ - 0, 1, 1, 2, - 0, 0, 1, 1, - 2, 2, 8, 3, - 1, 9, 1, 5 + [0, 1, 1, 2], + [0, 0, 1, 1], + [2, 2, 8, 3], + [1, 9, 1, 5], ] # add an image to overlay the circles on @@ -70,10 +71,10 @@ def make_circle(center, radius: float, n_points: int = 75) -> np.ndarray: figure["circles"].add_line_collection( circles, cmap="tab10", - cmap_transform=cmap_transform, + cmap_transform=np.asarray(cmap_transform).ravel(), thickness=3, alpha=0.5, - name="circles-graphic" + name="circles-graphic", ) # move the circles graphic so that it is centered over the image @@ -115,4 +116,3 @@ def make_circle(center, radius: float, n_points: int = 75) -> np.ndarray: if __name__ == "__main__": print(__doc__) fpl.loop.run() - diff --git a/examples/misc-dev/garbage_collection.py b/examples/misc-dev/garbage_collection.py index baa92e848..56ef0792b 100644 --- a/examples/misc-dev/garbage_collection.py +++ b/examples/misc-dev/garbage_collection.py @@ -1,9 +1,9 @@ import numpy as np -from wgpu.gui.auto import WgpuCanvas, run +from rendercanvas.auto import RenderCanvas, loop import pygfx as gfx import subprocess -canvas = WgpuCanvas() +canvas = RenderCanvas() renderer = gfx.WgpuRenderer(canvas) scene = gfx.Scene() camera = gfx.OrthographicCamera(5000, 5000) @@ -28,7 +28,11 @@ def draw(): def print_nvidia(msg=""): print(msg) print( - subprocess.check_output(["nvidia-smi", "--format=csv", "--query-gpu=memory.used"]).decode().split("\n")[1] + subprocess.check_output( + ["nvidia-smi", "--format=csv", "--query-gpu=memory.used"] + ) + .decode() + .split("\n")[1] ) print() @@ -57,4 +61,4 @@ def remove_img(*args): renderer.add_event_handler(add_img, "double_click") draw() -run() +loop.run() diff --git a/examples/misc-dev/selector_performance.ipynb b/examples/misc-dev/selector_performance.ipynb index 39dbba6b8..bbbe8c40b 100644 --- a/examples/misc-dev/selector_performance.ipynb +++ b/examples/misc-dev/selector_performance.ipynb @@ -32,10 +32,10 @@ " xs = radius * np.sin(theta)\n", " ys = radius * np.cos(theta)\n", " zs = np.zeros(xs.size)\n", - " \n", + "\n", " xs += center[0]\n", " ys += center[1]\n", - " \n", + "\n", " return np.ascontiguousarray(np.column_stack([xs, ys, zs]).astype(np.float32))" ] }, @@ -76,7 +76,7 @@ }, "outputs": [], "source": [ - "from wgpu.gui.auto import WgpuCanvas, run\n", + "from rendercanvas.auto import RenderCanvas\n", "import pygfx as gfx" ] }, @@ -89,7 +89,7 @@ }, "outputs": [], "source": [ - "canvas = WgpuCanvas()\n", + "canvas = RenderCanvas()\n", "renderer = gfx.WgpuRenderer(canvas)" ] }, @@ -163,7 +163,7 @@ "\n", "for l in lines[100:1000]:\n", " l.visible = False\n", - " \n", + "\n", "# canvas.request_draw()\n", "\n", "time() - t1" @@ -186,7 +186,7 @@ " ys = np.sin(xs) * 10\n", " else:\n", " ys = np.cos(xs) * 10\n", - " \n", + "\n", " temporal.append(ys)" ] }, @@ -233,7 +233,7 @@ "def update_visible(ev):\n", " ixs_visible = ev.pick_info[\"selected_indices\"]\n", " ixs_hide = np.setdiff1d(np.arange(len(circles)), ixs_visible)\n", - " \n", + "\n", " # very fast, 20 ms to change 1,000\n", " for i, g in enumerate(contours.graphics):\n", " if not g.visible and i in ixs_visible:\n", @@ -320,10 +320,10 @@ "\n", "for c in contours.graphics[100:1000]:\n", " c.visible = True\n", - " \n", + "\n", "# for i in range(100, 1000):\n", "# contours.graphics[i].world_object.visible = True\n", - " \n", + "\n", "time() - t1" ] }, @@ -342,7 +342,7 @@ "for c in circles:\n", " start_offset += c.shape[0]\n", " zero_alpha_ixs += [start_offset - 1, start_offset]\n", - " \n", + "\n", "zero_alpha_ixs = zero_alpha_ixs[:-1]" ] }, @@ -370,13 +370,13 @@ "def set_visible_alpha(ev):\n", " ixs_visible = ev.pick_info[\"selected_indices\"]\n", " ixs_hide = np.setdiff1d(np.arange(len(circles)), ixs_visible)\n", - " \n", + "\n", " for i in ixs_visible:\n", " contours.world_object.geometry.colors.data[(i * 75) + 1:(i * 75) + 74, -1] = 1\n", - " \n", + "\n", " for i in ixs_hide:\n", " contours.world_object.geometry.colors.data[(i * 75) + 1:(i * 75) + 74, -1] = 0\n", - " \n", + "\n", " contours.world_object.geometry.colors.update_range()" ] }, diff --git a/examples/notebooks/screenshots/nb-astronaut.png b/examples/notebooks/screenshots/nb-astronaut.png index 4221e7c6a..cebcc4f74 100644 --- a/examples/notebooks/screenshots/nb-astronaut.png +++ b/examples/notebooks/screenshots/nb-astronaut.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ce5e7e3fa03f5450948725f0a983547a66601a5b80f0423d0e99c6a8751cf25 -size 65875 +oid sha256:c0f32394238fe9b317c11eea52ded0c663a9a37a4bb9ac3aaf7ec05ba7c39e55 +size 66265 diff --git a/examples/notebooks/screenshots/nb-astronaut_RGB.png b/examples/notebooks/screenshots/nb-astronaut_RGB.png index 392c40cdc..6a9c3b26f 100644 --- a/examples/notebooks/screenshots/nb-astronaut_RGB.png +++ b/examples/notebooks/screenshots/nb-astronaut_RGB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d2a7c9fdaa8e334bb7fc4633e0a6e7b52dba7b5b492b48cc3e339e83bcac30d -size 63881 +oid sha256:96e2e88b1eed0844bd9f5066d876ec00123cccabbe0f03ceb4dad8c4feb80005 +size 64221 diff --git a/examples/notebooks/screenshots/nb-camera.png b/examples/notebooks/screenshots/nb-camera.png index 13d53f996..f89a7da0f 100644 --- a/examples/notebooks/screenshots/nb-camera.png +++ b/examples/notebooks/screenshots/nb-camera.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3bde9f5050e83ef47dbfa7fae421abd58e5d97eb6ed4db135c296702d8e78ab4 -size 49720 +oid sha256:0a2280fb566459dd868b930bfe8ddd22ee15998d50f23ef44ec31d065f81353b +size 49947 diff --git a/examples/notebooks/screenshots/nb-image-widget-movie-set_data.png b/examples/notebooks/screenshots/nb-image-widget-movie-set_data.png index f9194e2fd..17eac72c3 100644 --- a/examples/notebooks/screenshots/nb-image-widget-movie-set_data.png +++ b/examples/notebooks/screenshots/nb-image-widget-movie-set_data.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db3c05f59d37df596a669106ad01f67ce335a25a0e601a22438de2b9bb77b3dc -size 63059 +oid sha256:2c5d1bee0215d1b5fa2fd5f07c372337a2c0f8d7532092faf189b41b5ae90796 +size 64032 diff --git a/examples/notebooks/screenshots/nb-image-widget-movie-single-0-reset.png b/examples/notebooks/screenshots/nb-image-widget-movie-single-0-reset.png index 3253f0426..888490a86 100644 --- a/examples/notebooks/screenshots/nb-image-widget-movie-single-0-reset.png +++ b/examples/notebooks/screenshots/nb-image-widget-movie-single-0-reset.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:253ff39f89c71b0bb2f0a2b51d9a7f47a35a0e92651881d6180ac541ff26861d -size 113825 +oid sha256:c5dc016ac3b2cb6553ca67fcf2450eba3334b6280c66b01583adac672100f3f6 +size 115971 diff --git a/examples/notebooks/screenshots/nb-image-widget-movie-single-0.png b/examples/notebooks/screenshots/nb-image-widget-movie-single-0.png index 3253f0426..888490a86 100644 --- a/examples/notebooks/screenshots/nb-image-widget-movie-single-0.png +++ b/examples/notebooks/screenshots/nb-image-widget-movie-single-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:253ff39f89c71b0bb2f0a2b51d9a7f47a35a0e92651881d6180ac541ff26861d -size 113825 +oid sha256:c5dc016ac3b2cb6553ca67fcf2450eba3334b6280c66b01583adac672100f3f6 +size 115971 diff --git a/examples/notebooks/screenshots/nb-image-widget-movie-single-279.png b/examples/notebooks/screenshots/nb-image-widget-movie-single-279.png index 29ed34a10..1b000ac9d 100644 --- a/examples/notebooks/screenshots/nb-image-widget-movie-single-279.png +++ b/examples/notebooks/screenshots/nb-image-widget-movie-single-279.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a727bd83bca1b5c5e35607e34062265b1058683dc3bd67e4ab5afba09253734d -size 136027 +oid sha256:ca0b4a4a366c08cbe2ce612023ed0d46fc4121bfdb397b97c01f0b4fcc846ba9 +size 137759 diff --git a/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-max-33.png b/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-max-33.png index d209d78bb..8e3b3f443 100644 --- a/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-max-33.png +++ b/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-max-33.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d50360d41aa5e9e7aee9745187da1be087dc0fca10bc2ba32bcc862e35f2a2ef -size 122211 +oid sha256:deb5ef697a6240d66d1fc32364cdb9c30876a809706b4ecc7182c02fdad893c3 +size 124444 diff --git a/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-mean-13.png b/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-mean-13.png index 97157abca..24f0af167 100644 --- a/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-mean-13.png +++ b/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-mean-13.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d2059f2f5d7765ebf3c318978acb2c19dd6036e760ea3e070fbbfe2bf2d4a27a -size 107169 +oid sha256:0d656095fa6f30f00f4beeefdbbc57403d51a442908cd9c69c4d9366023c51e5 +size 108924 diff --git a/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-mean-33.png b/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-mean-33.png index b7af3202d..14446219c 100644 --- a/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-mean-33.png +++ b/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-mean-33.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb9a22d365dd08a3a3be2c7065adf5d44c1d67320af36629ce2e5a8ebf527f71 -size 99261 +oid sha256:97b2cd703d8a465137834e264ba723c58e861c7e82d2675b5bb00b0ba0546c30 +size 101247 diff --git a/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-reset.png b/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-reset.png index b1bc3414f..45bf24ea5 100644 --- a/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-reset.png +++ b/examples/notebooks/screenshots/nb-image-widget-movie-single-50-window-reset.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b2f75ca1d712ee3bb70f5b6f07c50660464a014490652d86e9a3a328c3cd54b -size 119942 +oid sha256:b85764ef017fd475f49c6d1b57d4a347ab63aaf4c3e6a36bc1de6d61a678c6df +size 122086 diff --git a/examples/notebooks/screenshots/nb-image-widget-movie-single-50.png b/examples/notebooks/screenshots/nb-image-widget-movie-single-50.png index b1bc3414f..45bf24ea5 100644 --- a/examples/notebooks/screenshots/nb-image-widget-movie-single-50.png +++ b/examples/notebooks/screenshots/nb-image-widget-movie-single-50.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b2f75ca1d712ee3bb70f5b6f07c50660464a014490652d86e9a3a328c3cd54b -size 119942 +oid sha256:b85764ef017fd475f49c6d1b57d4a347ab63aaf4c3e6a36bc1de6d61a678c6df +size 122086 diff --git a/examples/notebooks/screenshots/nb-image-widget-single-gnuplot2.png b/examples/notebooks/screenshots/nb-image-widget-single-gnuplot2.png index c96a6de51..d42da0d01 100644 --- a/examples/notebooks/screenshots/nb-image-widget-single-gnuplot2.png +++ b/examples/notebooks/screenshots/nb-image-widget-single-gnuplot2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f1ca8a4c1ca0f02a6d1217c13f740407073cf70730d5455c81344a5753c4dc7 -size 224053 +oid sha256:5e52ce739f941d0cb6353322238e5a3da6cb02b9e8d504a1027e381f3ee74474 +size 225937 diff --git a/examples/notebooks/screenshots/nb-image-widget-single.png b/examples/notebooks/screenshots/nb-image-widget-single.png index cf60b005f..e07679554 100644 --- a/examples/notebooks/screenshots/nb-image-widget-single.png +++ b/examples/notebooks/screenshots/nb-image-widget-single.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dde00bbf68eec1d531a19649cb6814d360073f0920837ad965cf816b308fdf97 -size 215376 +oid sha256:b66a299b9b6aae8e2161a1afa789fdf2f4763c681628f9c7bdcf353da2b35656 +size 216922 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-frame-apply-gaussian.png b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-frame-apply-gaussian.png index 68d204849..a91af9da9 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-frame-apply-gaussian.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-frame-apply-gaussian.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f90eb33b10caad47dc47425d517297de86754178e3f6764c30c0066227dd0d76 -size 62383 +oid sha256:3a5fe6c2b790dc062ac0aeddce24f462da2d6dcf752d86bd400ccf28f1c912a7 +size 64992 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-frame-apply-reset.png b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-frame-apply-reset.png index d35a258d1..7b2239958 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-frame-apply-reset.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-frame-apply-reset.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7ec728806cdad8aa89e74095c12637d5ef36c95d967b1ead58c6a6b4d750471d -size 67108 +oid sha256:99ea64fe85c0ff218afb91389a4d38c3e6b184859b4635d237635b914b47ee03 +size 69473 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-max-window-13.png b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-max-window-13.png index c8559bc33..6614a8021 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-max-window-13.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-max-window-13.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:131ea555e5616caed42420c3fa8f1443f14725aa37c44ad526fb45f041d79d3f -size 110570 +oid sha256:70c5d778b6acd1c97252deccce6ded218380a08fb04f872489838f6da516349b +size 113931 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-mean-window-13.png b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-mean-window-13.png index e50e5cce9..70acf36ab 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-mean-window-13.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-mean-window-13.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9fecadbc230f00207f4b237205762bde7213e47eb9d8dc5edd24ef844a7170f5 -size 94421 +oid sha256:1f2f1291f3a03ce5100598663baa62a2a68d31c548ccfeb901ba63b0f2edfe77 +size 97498 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-mean-window-5.png b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-mean-window-5.png index 7fcb45dcc..d7d8a6c43 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-mean-window-5.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50-mean-window-5.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8b7efaf332e0344c9e4dd465cffad2e9bcd317c342363ebd56bd40fc7a84d4c -size 87259 +oid sha256:c5f6e02933fbf04ac8bb97ee959756a4c2701dc7f62d7922c334d507cdac66e2 +size 89628 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50.png b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50.png index 70710ca02..7b2239958 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-50.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54d256826fce09ddf226d6d53679a17e5bee75f510603f897628fd842c5893ba -size 67103 +oid sha256:99ea64fe85c0ff218afb91389a4d38c3e6b184859b4635d237635b914b47ee03 +size 69473 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-99.png b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-99.png index b36332164..6fd1a14ab 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-frame-99.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-frame-99.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:353d8f0e370489b1ad51cfc71cfb8a6748d156541f7f70f5d16343209166da31 -size 59202 +oid sha256:3792fa22b1bef03871dab9cd0c8a34d58b3fe9ecb565f17e772a54f0459a7f63 +size 60801 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-frame-apply-gaussian.png b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-frame-apply-gaussian.png index a6c3ac9c6..5e60750e1 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-frame-apply-gaussian.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-frame-apply-gaussian.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ca29700c76cfd6396a181b43adacefc31c98cc3d4d9d0c92eada990e477452e -size 84321 +oid sha256:5d588c44d786cf667640e1b4664e6c3daaf946fb8373f5afb7ea6dd97ee445a9 +size 86503 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-frame-apply-reset.png b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-frame-apply-reset.png index 906af2702..969404d6a 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-frame-apply-reset.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-frame-apply-reset.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b388954425e2cb45e7982eaab92db51889cf86e21989f5f926ace1ca565bdf90 -size 101869 +oid sha256:87c51655ffee08b1c892b8f7773b7b2137bb52b1457bbfb1c5f4ae342ab508ea +size 104071 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-max-window-13.png b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-max-window-13.png index 0fc2ff6a1..4c677b40e 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-max-window-13.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-max-window-13.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ae0a4201dc239e6d6d187ab9d281a1e15210c9f0c3278f404da86337ec597a05 -size 140995 +oid sha256:57f298f02a1df8fa797e3773a3e976dc3ce6ce67d7c781676582119e6452001b +size 144021 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-mean-window-13.png b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-mean-window-13.png index 948852987..05fbce7f7 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-mean-window-13.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-mean-window-13.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:42d9880fd977db69748ee548f058a7d9c7a5fc69cbd38830e3138467070e24c7 -size 113861 +oid sha256:c3c5adf6bf3f031bd9a9ea6041156905039c9bc56cbffcf0079e08b6cd5ac547 +size 116844 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-mean-window-5.png b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-mean-window-5.png index e0cc721d3..6247c5905 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-mean-window-5.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50-mean-window-5.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6c378ccbe50cfd547c2edaa034c7064564eb325ce504659f57325c0991a11f6 -size 115883 +oid sha256:42a6cfcb2b1fe8919bf15a4e52fccf65d518d34628ad7c5b5ba9bfabc1a18e36 +size 118412 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50.png b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50.png index 13b30b0c2..b35f45233 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-50.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19aa140345ac26b6b5542d44334b748408db54881bf73a4b88be66498a2d9433 -size 101937 +oid sha256:59856df53d455010f8d5c582259ef587ba7c7022e4a923b9d11c6944d82d474f +size 103953 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-99.png b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-99.png index f66664d4d..128feac14 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-99.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-frame-99.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e48ab3a730132a773f784876e173b2fe3165d70121489a4c08270b9bfdc8fdbf -size 99569 +oid sha256:ddd3b78f4e2436c688e780b501fec740eb0fe6460deb2122979d11da43ccaf22 +size 101213 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-init-mean-window-5.png b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-init-mean-window-5.png index e27d39419..2b2d1e8d1 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-init-mean-window-5.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-init-mean-window-5.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df90973bbba10bab86152973359e0ddbb62dc2b1b9af38cb9b557166edd547f8 -size 110530 +oid sha256:24eac0c3c168f4afe74cbb3d9ee95d393664341e35b11eb1b3972446a21616c1 +size 113053 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-set_data-reset-indices-false.png b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-set_data-reset-indices-false.png index 40a7a2a96..3eb50089a 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-set_data-reset-indices-false.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-set_data-reset-indices-false.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c59705a9ca68af29502ec96407cf1690d8852ad871a00b2b1f51a9a3edd90757 -size 101753 +oid sha256:3fc6b1fcd3df0d8dc3446f9570b37016150d353806b2d13f6e777ca0eb4b27f6 +size 104045 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-set_data-reset-indices-true.png b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-set_data-reset-indices-true.png index 8e3be816c..260de77d8 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-grid-set_data-reset-indices-true.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-grid-set_data-reset-indices-true.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c91eca03cd88468aa24f3abca2dbf4a5b336a522749af782df2e4afe9e0d2c6 -size 102718 +oid sha256:6a02745049f9167c2bbb2d44f0959dd9f251254c3e812457b284c6890bda3bc4 +size 105426 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-init-mean-window-5.png b/examples/notebooks/screenshots/nb-image-widget-zfish-init-mean-window-5.png index b49eb6f20..31219597e 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-init-mean-window-5.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-init-mean-window-5.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:66158475df991caa5fab6821e0eec5a29ccc41f989f6d691d1c315a4892132fe -size 74392 +oid sha256:9dae5806f87b217215098f1b74b910e778c0fb3249411564ce2baf59a002c52b +size 77044 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-frame-50.png b/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-frame-50.png index 9c4e54556..19724d061 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-frame-50.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-frame-50.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6cf738aff9bf8254f4141fc7d8fee4e74e2b65dab7f7799a3fb0c4698d1213b -size 112509 +oid sha256:3bf8dc7928b28a341d5938b315d143a017de43e907ff91423064d2265f8afd40 +size 112855 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-set-data.png b/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-set-data.png index 117451b7e..ff2aa5de7 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-set-data.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-set-data.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af5897e58e484a5b2f3713c663019eda7e215e1edd6e9867413611bd9ed9df0e -size 107951 +oid sha256:c67aa2880595c3cf18e69d6a2886606b039d38eebc1219b765294af01f7ac619 +size 108348 diff --git a/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-windowrgb.png b/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-windowrgb.png index 8c60e9557..c0ec3fa5d 100644 --- a/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-windowrgb.png +++ b/examples/notebooks/screenshots/nb-image-widget-zfish-mixed-rgb-cockatoo-windowrgb.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4eab140f2b539d0916d24d8d6704e6836cb0e3697985580e5b6fa44473781a3 -size 109170 +oid sha256:dce2e94163c894b254c5295e54852a988ea063c92ebd38bc3fdf09d78e8d66e9 +size 110236 diff --git a/examples/notebooks/screenshots/nb-lines-3d.png b/examples/notebooks/screenshots/nb-lines-3d.png index b24a62173..4895996d6 100644 --- a/examples/notebooks/screenshots/nb-lines-3d.png +++ b/examples/notebooks/screenshots/nb-lines-3d.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:49a929160a3b1765e74a9972a4ddbc869d9a1af1599f10baf6e491b2d0680639 -size 18827 +oid sha256:2924aef7286417e78f023810d1f8cebee85e4ee944537bb28a1d2979cc5eacb5 +size 17957 diff --git a/examples/notebooks/screenshots/nb-lines-colors.png b/examples/notebooks/screenshots/nb-lines-colors.png index 1c645ee4e..d75d84229 100644 --- a/examples/notebooks/screenshots/nb-lines-colors.png +++ b/examples/notebooks/screenshots/nb-lines-colors.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8920126b05d3359c7d8b308b0c42553e42d9791381e6d60b5c2c02eadccefd7d -size 32679 +oid sha256:ab117d2995b8ec4c9656d7b7101ded007db167592d92b1d7ae2d2751011fb505 +size 30939 diff --git a/examples/notebooks/screenshots/nb-lines-data.png b/examples/notebooks/screenshots/nb-lines-data.png index c05f09a43..44f6e486b 100644 --- a/examples/notebooks/screenshots/nb-lines-data.png +++ b/examples/notebooks/screenshots/nb-lines-data.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3302edd24977282850fae6b73f2e96a296f2b7163acc9de6f8df7b9e6ba48bd6 -size 39894 +oid sha256:c602844bcbd32d94838d5c9c74c4620162bd65bd87bbabe9c60b417fdefdc5ee +size 37158 diff --git a/examples/notebooks/screenshots/nb-lines-underlay.png b/examples/notebooks/screenshots/nb-lines-underlay.png index dfed9dbe3..4ad000048 100644 --- a/examples/notebooks/screenshots/nb-lines-underlay.png +++ b/examples/notebooks/screenshots/nb-lines-underlay.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94865d4a62545e53fd0d2967177b24c0896a64be28c9d6dcb9395cea5c09b7aa -size 52034 +oid sha256:5895cfb7c24749b54acb26c4903ebd4508b65ef436a6e8de3ac7f40ac03d76f7 +size 50003 diff --git a/examples/notebooks/screenshots/nb-lines.png b/examples/notebooks/screenshots/nb-lines.png index 8e7507793..c422fcb80 100644 --- a/examples/notebooks/screenshots/nb-lines.png +++ b/examples/notebooks/screenshots/nb-lines.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:85329a9e4a60d4a2202b61c33d02ff7d6fb7d9edb1593d8e8e6fef6c6c58ca46 -size 27303 +oid sha256:fec20ab8f0cb4948dc05afff33191cdc81cb54c722900c6b8705a4bb7efef8e8 +size 23473 diff --git a/examples/notebooks/screenshots/no-imgui-nb-astronaut.png b/examples/notebooks/screenshots/no-imgui-nb-astronaut.png index efc7baa98..174b8181d 100644 --- a/examples/notebooks/screenshots/no-imgui-nb-astronaut.png +++ b/examples/notebooks/screenshots/no-imgui-nb-astronaut.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c80e71dde6812321add9ae9f84c86f9f7d28a65f420da5bd61c4abe537ac7d1c -size 74000 +oid sha256:a9195062f4f4cc37e3975468e8ae397aa9c8064e7f89f2821f6a9ca2b204f0a3 +size 73410 diff --git a/examples/notebooks/screenshots/no-imgui-nb-astronaut_RGB.png b/examples/notebooks/screenshots/no-imgui-nb-astronaut_RGB.png index 4d95ad3c9..75ef377aa 100644 --- a/examples/notebooks/screenshots/no-imgui-nb-astronaut_RGB.png +++ b/examples/notebooks/screenshots/no-imgui-nb-astronaut_RGB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:995908845e4e5a21c2ed45de2cdd251386ebfb3f6d2e8f1a420b39944d79347d -size 71874 +oid sha256:a5e46f43c0b440811c626853d5995466347c3a51f49cf129133a8e0ad3c8cea7 +size 71277 diff --git a/examples/notebooks/screenshots/no-imgui-nb-camera.png b/examples/notebooks/screenshots/no-imgui-nb-camera.png index cc8bc83cb..aa9ccb37b 100644 --- a/examples/notebooks/screenshots/no-imgui-nb-camera.png +++ b/examples/notebooks/screenshots/no-imgui-nb-camera.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:969a733add867c12f05439b8280bd594e97061a06b56676e700441f8d16c7697 -size 55147 +oid sha256:07080677bb75b39ee90d86d15172e08423bf764cb48f75100f3d9bc6c1107024 +size 54539 diff --git a/examples/notebooks/screenshots/no-imgui-nb-lines-3d.png b/examples/notebooks/screenshots/no-imgui-nb-lines-3d.png index 35be289f6..0af986c10 100644 --- a/examples/notebooks/screenshots/no-imgui-nb-lines-3d.png +++ b/examples/notebooks/screenshots/no-imgui-nb-lines-3d.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a796f29923d0a051e0dde891e6fbdb3a796871ec028581c03fb9e648b156968 -size 19246 +oid sha256:8f3c230460cd4397c24e07e0b671581bb9234254687a7ed839a5500b44ee1485 +size 17783 diff --git a/examples/notebooks/screenshots/no-imgui-nb-lines-colors.png b/examples/notebooks/screenshots/no-imgui-nb-lines-colors.png index aa36be9f3..2ca81d14d 100644 --- a/examples/notebooks/screenshots/no-imgui-nb-lines-colors.png +++ b/examples/notebooks/screenshots/no-imgui-nb-lines-colors.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ae2ce951dba034032df0d708344a84c8421e93f5943738132e924ad5a990772 -size 33612 +oid sha256:73872b407bf32309aac7ef7f1169a5cae62e5d6cc5c9ac5df7dcd716fb9da91d +size 31437 diff --git a/examples/notebooks/screenshots/no-imgui-nb-lines-data.png b/examples/notebooks/screenshots/no-imgui-nb-lines-data.png index 9245cf06d..6161902ef 100644 --- a/examples/notebooks/screenshots/no-imgui-nb-lines-data.png +++ b/examples/notebooks/screenshots/no-imgui-nb-lines-data.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:95580aef77da982bc42e4dd27383f5b407dadfbb9dd06fc6ed7aabb09a020d51 -size 42595 +oid sha256:26fe3ec674af9d19e08e8ad3246c1ca69bb5ac5a6e4cb23077b8cebf2860ba85 +size 39168 diff --git a/examples/notebooks/screenshots/no-imgui-nb-lines-underlay.png b/examples/notebooks/screenshots/no-imgui-nb-lines-underlay.png index 4e44f5e72..ea3e6170c 100644 --- a/examples/notebooks/screenshots/no-imgui-nb-lines-underlay.png +++ b/examples/notebooks/screenshots/no-imgui-nb-lines-underlay.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0775cdf2f528cd987622c4431ddfcbc10a1f57766dadaac7bae35f8c8e9c1ed3 -size 55353 +oid sha256:4db9bf43b9be8055a13fec7cdd6d1c11fe14db4078616e4e19690a96890d5224 +size 52777 diff --git a/examples/notebooks/screenshots/no-imgui-nb-lines.png b/examples/notebooks/screenshots/no-imgui-nb-lines.png index 9e0273dd9..79c88a22e 100644 --- a/examples/notebooks/screenshots/no-imgui-nb-lines.png +++ b/examples/notebooks/screenshots/no-imgui-nb-lines.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05f9619a5acf17978e3597fb2ef40c47ae63b9c6f8e39b9f5ff8e936b5e8e00c -size 27681 +oid sha256:a8fae40886e496e5377613ab6a08f20d11d41c037f4ec243d57c33948078674d +size 23462 diff --git a/examples/scatter/scatter_colorslice.py b/examples/scatter/scatter_colorslice.py index d8bbc620b..5b18d2e0e 100644 --- a/examples/scatter/scatter_colorslice.py +++ b/examples/scatter/scatter_colorslice.py @@ -36,7 +36,9 @@ colors = ["yellow"] * n_points + ["cyan"] * n_points + ["magenta"] * n_points # use an alpha value since this will be a lot of points -figure[0, 0].add_scatter(data=cloud, sizes=3, colors=colors, alpha=0.6) +figure[0, 0].add_scatter( + data=cloud, sizes=3, colors=colors, alpha_mode="weighted_blend", alpha=0.6 +) figure.show() diff --git a/examples/screenshots/extent_frac_layout.png b/examples/screenshots/extent_frac_layout.png index 1df76dc61..3059e78d0 100644 --- a/examples/screenshots/extent_frac_layout.png +++ b/examples/screenshots/extent_frac_layout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc8ec12042a36992dbda00d04f251b47d58cd6d75eca5c4240cd207878f9282f -size 157607 +oid sha256:fa5563fc8bd9f7b24f3f25a98aa1ce6de3afea9b5c1f1cd7cc580fa4866fe796 +size 144210 diff --git a/examples/screenshots/extent_layout.png b/examples/screenshots/extent_layout.png index fa89b9afc..23303dd28 100644 --- a/examples/screenshots/extent_layout.png +++ b/examples/screenshots/extent_layout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:823785f993237cb0f2773aea62c3dbbe16fe63f86f83867f1e27b82c8793da9f -size 126051 +oid sha256:e1716c3f2e1309643a53759e9b5226440c9ac2e6be930f52439305a91c5ca914 +size 117466 diff --git a/examples/screenshots/gridplot.png b/examples/screenshots/gridplot.png index 27eb82675..0f13fd803 100644 --- a/examples/screenshots/gridplot.png +++ b/examples/screenshots/gridplot.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:07a1e902cb6ed8c95df8adb4091b2a825ffecbf0e26a9dcffc0d1272a886d7d9 -size 261210 +oid sha256:f0cf92add943b5fafe8615200922714302386277e81cb0643d0024b9f3b31f4a +size 260740 diff --git a/examples/screenshots/gridplot_non_square.png b/examples/screenshots/gridplot_non_square.png index d11a9f104..607b7c1d3 100644 --- a/examples/screenshots/gridplot_non_square.png +++ b/examples/screenshots/gridplot_non_square.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e40be809e47d7a19fbf1a292a575344414acf5a23609f1796041dd8b91362c97 -size 200969 +oid sha256:69bb806090ae96978b51f46f36394384db31add4c2b0290936859a3703f25291 +size 198799 diff --git a/examples/screenshots/gridplot_viewports_check.png b/examples/screenshots/gridplot_viewports_check.png index dba29a356..34fd20c6c 100644 --- a/examples/screenshots/gridplot_viewports_check.png +++ b/examples/screenshots/gridplot_viewports_check.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:51080904e1156d0427834195141f9c08270f98dbef55a3c3f2fa2e35037814c6 -size 77856 +oid sha256:a5569c549098c0b02d32a76f82897f32f748fc297b20b71b9081da551768d467 +size 45126 diff --git a/examples/screenshots/heatmap.png b/examples/screenshots/heatmap.png index 34f139e19..a6cbbb91d 100644 --- a/examples/screenshots/heatmap.png +++ b/examples/screenshots/heatmap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2235079838197971d340f07bd12998e371b4db54e7136e60dbcb8b43f44561a4 -size 92210 +oid sha256:75cf8ae3241a526044fbcd920f36a77c27752ce06cb920bd2ed6b7b8041f6125 +size 89156 diff --git a/examples/screenshots/image_cmap.png b/examples/screenshots/image_cmap.png index 2621e7581..c2b466eca 100644 --- a/examples/screenshots/image_cmap.png +++ b/examples/screenshots/image_cmap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc9dae363b1490506dda0c7d1aa1fd24232e3daa484178d8a9e88f49a1aa2058 -size 209014 +oid sha256:d3cfe74816efe00318c6a73d2411458a84af486f1d3099ca80807c5fd9fc3d73 +size 209290 diff --git a/examples/screenshots/image_rgb.png b/examples/screenshots/image_rgb.png index e20121cde..85905def5 100644 --- a/examples/screenshots/image_rgb.png +++ b/examples/screenshots/image_rgb.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5500a673085eb0d7d4293bba7f4963482c234cd80622179f2e476e58712cbfd4 -size 233875 +oid sha256:152f02896e634a5424ef3045cdb256c05831d76ea37c7b222f42c8009f60aaae +size 234270 diff --git a/examples/screenshots/image_rgbvminvmax.png b/examples/screenshots/image_rgbvminvmax.png index 39a0707d5..c9453b9ff 100644 --- a/examples/screenshots/image_rgbvminvmax.png +++ b/examples/screenshots/image_rgbvminvmax.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:758869786f243a1c1a2e2214f70f788e0decc5854f2825bd4133008aa481690e -size 46215 +oid sha256:b6da94023f204e3feb6aaa52505c32d5218b111295691e622a1f04300855fa64 +size 43251 diff --git a/examples/screenshots/image_simple.png b/examples/screenshots/image_simple.png index 44e6fc62f..5ef9fb7a6 100644 --- a/examples/screenshots/image_simple.png +++ b/examples/screenshots/image_simple.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b726be63c21f174d269441978adda9163759453fd210e60f9027ec45ebe8fbb7 -size 208692 +oid sha256:34e67246f8880636cf31e59c9624d2361880bdc5f539457fa98e484f3605d080 +size 209033 diff --git a/examples/screenshots/image_small.png b/examples/screenshots/image_small.png index c52a160ae..e67c4a22e 100644 --- a/examples/screenshots/image_small.png +++ b/examples/screenshots/image_small.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61375cfac467c64ec7a49b830edf602943613605a82619ee006e8cb94be47f1e -size 14950 +oid sha256:e1a336451b1eea664734b7331e8e87de6af7cd92f7bfae44fbb91aa05d79d092 +size 12876 diff --git a/examples/screenshots/image_vminvmax.png b/examples/screenshots/image_vminvmax.png index 39a0707d5..c9453b9ff 100644 --- a/examples/screenshots/image_vminvmax.png +++ b/examples/screenshots/image_vminvmax.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:758869786f243a1c1a2e2214f70f788e0decc5854f2825bd4133008aa481690e -size 46215 +oid sha256:b6da94023f204e3feb6aaa52505c32d5218b111295691e622a1f04300855fa64 +size 43251 diff --git a/examples/screenshots/image_widget.png b/examples/screenshots/image_widget.png index b088518a8..e0eb67609 100644 --- a/examples/screenshots/image_widget.png +++ b/examples/screenshots/image_widget.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4d88b1f2d47b7e3a9b7eb01cf4fce3a061e17e260d04c52c8ac2c7bb11cc27e5 -size 189495 +oid sha256:c2cc3c37ee28e16d94b1d437d5ef9ac6c73dfc7f8bf8e39c61d63c8bda5bd26f +size 188762 diff --git a/examples/screenshots/image_widget_grid.png b/examples/screenshots/image_widget_grid.png index 84ac3f59f..21d0ebacf 100644 --- a/examples/screenshots/image_widget_grid.png +++ b/examples/screenshots/image_widget_grid.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ed702632b7e58b2dfaa19d15ad4d234ef08d72fc222d21e43ff934d664ed0b18 -size 254523 +oid sha256:4ff7ba5c7a1ea220fb49936fa71c92f2fd5c50b3aa51837db0a5b3f5f53f2461 +size 245187 diff --git a/examples/screenshots/image_widget_imgui.png b/examples/screenshots/image_widget_imgui.png index 934db35ab..51594b863 100644 --- a/examples/screenshots/image_widget_imgui.png +++ b/examples/screenshots/image_widget_imgui.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a23cbd21c96fe161de7621f7a733d2e6a67c697efae46d38258443fbd3160b7 -size 173705 +oid sha256:851714956ea3727d8b6d66d88fc7d57b08ac39d5af0cb3b3e409e870dfd37e76 +size 174624 diff --git a/examples/screenshots/image_widget_single_video.png b/examples/screenshots/image_widget_single_video.png index a3d2c5686..51a7d83fd 100644 --- a/examples/screenshots/image_widget_single_video.png +++ b/examples/screenshots/image_widget_single_video.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dae1a4f7614222b9163256257df09c1e01abf6f066ebf59faf82c3134fe0c420 -size 99410 +oid sha256:ae426cb3b41874c1f20e3579a539b3229ca164ead978e127366c8d7185544cc4 +size 93730 diff --git a/examples/screenshots/image_widget_videos.png b/examples/screenshots/image_widget_videos.png index dd8dfb8c1..c7c45c39a 100644 --- a/examples/screenshots/image_widget_videos.png +++ b/examples/screenshots/image_widget_videos.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e19ea5b2e209461926fe343ccf83422d180506da899aa621519b4921dda0d24 -size 335631 +oid sha256:0054d3c7e63d951a892f06f206e2ceb4e96c19d69266f5401cbac7da80c40361 +size 311541 diff --git a/examples/screenshots/image_widget_viewports_check.png b/examples/screenshots/image_widget_viewports_check.png index d5b4010c7..a0366440c 100644 --- a/examples/screenshots/image_widget_viewports_check.png +++ b/examples/screenshots/image_widget_viewports_check.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:91a2c5bae1796ed9605f4de65dba14151ad8deaf253e3fb0aa043a4579da708d -size 117505 +oid sha256:bce01da442cabd92e0944215ece40a9887ef2eff5d49320a046893c31d640418 +size 85531 diff --git a/examples/screenshots/imgui_basic.png b/examples/screenshots/imgui_basic.png index 39817dd97..5296a04f1 100644 --- a/examples/screenshots/imgui_basic.png +++ b/examples/screenshots/imgui_basic.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c1bc5f46e04c2a1098b2a7d7f8bf4c4915cd74af40bb55b4fb1d111d82638843 -size 34503 +oid sha256:f3e3fe17f1e35e6a5abb2ed312b1bbdb6b0ec3c3f8fff48be0d28f9385c76e65 +size 35881 diff --git a/examples/screenshots/line.png b/examples/screenshots/line.png index 99f87d243..19ecfcaf3 100644 --- a/examples/screenshots/line.png +++ b/examples/screenshots/line.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9985e9fc1c58305bca43e00f35ea6017f916652100d2e463e8ea01a0df3b55d6 -size 232883 +oid sha256:bace8f1e9179eb9418c80e273dfb290be4229334542092cd5f001fc429c430f8 +size 152561 diff --git a/examples/screenshots/line_cmap.png b/examples/screenshots/line_cmap.png index 1c6352ba0..d998fb0c4 100644 --- a/examples/screenshots/line_cmap.png +++ b/examples/screenshots/line_cmap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e893699989c9cf04d7b0d90070b85df5fa6135a363f6e447032aff6020bd476 -size 46137 +oid sha256:4efa1e76e172a57f3a9b90223a8be2ddc48e6c54ea8ec94ce3f83b1fa0b6cc08 +size 37829 diff --git a/examples/screenshots/line_cmap_more.png b/examples/screenshots/line_cmap_more.png index 39d0fcaa3..2b61ed446 100644 --- a/examples/screenshots/line_cmap_more.png +++ b/examples/screenshots/line_cmap_more.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3606f8c1bf83d537275a6b31ae9b9a392c73cb082e82215e348f6deec796aa8e -size 113003 +oid sha256:3e74c93cbf4e88d6eb13f599b2b70ca15c739d0ba0b9e1670431f4f5078e3fce +size 89687 diff --git a/examples/screenshots/line_collection.png b/examples/screenshots/line_collection.png index 0397d2dde..908c87729 100644 --- a/examples/screenshots/line_collection.png +++ b/examples/screenshots/line_collection.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d76339dbfdd246442312d9853b8d57de773f2a6b2337e75d85a2e3e7bfbee0e -size 88722 +oid sha256:232820431835de3a7795724827e8a179e5e47e32d7fabbef702b57497f16a917 +size 69488 diff --git a/examples/screenshots/line_collection_cmap_values.png b/examples/screenshots/line_collection_cmap_values.png index 19ce6ab73..4bbdaa0fe 100644 --- a/examples/screenshots/line_collection_cmap_values.png +++ b/examples/screenshots/line_collection_cmap_values.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d961d5a91b71d0042c652cc2196ec99586f41cd01a232d3940c41f9948cf4f6 -size 58191 +oid sha256:a3e27e891b1a3232780f159aa75592886f34492b4df1256b465379c3e4593552 +size 41492 diff --git a/examples/screenshots/line_collection_cmap_values_qualitative.png b/examples/screenshots/line_collection_cmap_values_qualitative.png index 264531b15..e746c2884 100644 --- a/examples/screenshots/line_collection_cmap_values_qualitative.png +++ b/examples/screenshots/line_collection_cmap_values_qualitative.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2fb808787bcd5abd39c9861ff38a4cc8740ca7bc7d0cb35249e7150c80633bb0 -size 61936 +oid sha256:964d2bccf0bd64de80c0617ddbf432ae3006ba27823a9b2107d42a2d4d6173b5 +size 44534 diff --git a/examples/screenshots/line_collection_colors.png b/examples/screenshots/line_collection_colors.png index fbb10cf96..39c3ad9e0 100644 --- a/examples/screenshots/line_collection_colors.png +++ b/examples/screenshots/line_collection_colors.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8396aa29f5246cb1f7edce74e6dd41313826f53b810e80b0e69b1ea6bf550cc4 -size 49546 +oid sha256:d3475c7485cc00633208be388b148564aea1d1883786e5402ea03bb576a8483f +size 33098 diff --git a/examples/screenshots/line_collection_slicing.png b/examples/screenshots/line_collection_slicing.png index 6fdb82fb4..428e6c33d 100644 --- a/examples/screenshots/line_collection_slicing.png +++ b/examples/screenshots/line_collection_slicing.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9235513b219ce076171cc9aa7e2c24c87cdad298a7004f52c5245dbd34b0505f -size 117970 +oid sha256:a88282f40fb1c02dfe7921793128e9b7abe1bbb85de0e12abc20cb23d3ecc720 +size 73949 diff --git a/examples/screenshots/line_colorslice.png b/examples/screenshots/line_colorslice.png index e55f4181f..c34889af7 100644 --- a/examples/screenshots/line_colorslice.png +++ b/examples/screenshots/line_colorslice.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0cb016d754d3ea461fb80ae9c545955b4c6ced182b141c125d70c11665ee0c04 -size 53057 +oid sha256:65593126a03d7368c746e5f1669109de167a16d1277f74562ce742095047af5d +size 43146 diff --git a/examples/screenshots/line_dataslice.png b/examples/screenshots/line_dataslice.png index c551e15cf..10a4fa573 100644 --- a/examples/screenshots/line_dataslice.png +++ b/examples/screenshots/line_dataslice.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d89f1f3dfc01a522c3fc2528219442ee947db4f22ad7f9afc9a0df014eb9addf -size 69625 +oid sha256:bee8eadc3a297dd1d666910d43ed14cc368577b94b5d8ef9f6443819eb2f1134 +size 44689 diff --git a/examples/screenshots/line_stack.png b/examples/screenshots/line_stack.png index cefe33da1..fd68e397c 100644 --- a/examples/screenshots/line_stack.png +++ b/examples/screenshots/line_stack.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a24c9a72ef5255c1615f478f01ea5f3957e8ab250702386f43a324b178e7458f -size 106509 +oid sha256:32aa5e6f7c47a99e2720267095c09184a3706fcfaa549661137358047ba6eab8 +size 55274 diff --git a/examples/screenshots/linear_region_selectors_match_offsets.png b/examples/screenshots/linear_region_selectors_match_offsets.png index 804efdff8..99830c8f4 100644 --- a/examples/screenshots/linear_region_selectors_match_offsets.png +++ b/examples/screenshots/linear_region_selectors_match_offsets.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3b2ca05654ad45e6447ee1b028967808553c63cb1a52fa01a99052d121865b3 -size 94695 +oid sha256:558a8d46400d51abd319e73e7953bda0ec36c99a18db0bdfcdefdf96dd77d630 +size 62670 diff --git a/examples/screenshots/linear_selector.png b/examples/screenshots/linear_selector.png index 1b25a535e..dfa96362b 100644 --- a/examples/screenshots/linear_selector.png +++ b/examples/screenshots/linear_selector.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd7dccdb26a32dec9a4c82028610d8da4058e9f590ae9dbfef558a3a976d64b4 -size 141373 +oid sha256:1b7973ea6abdbbeb5feb9fdeb3c94ed7f0e4930c8b98f304f2938329678686a7 +size 105205 diff --git a/examples/screenshots/no-imgui-extent_frac_layout.png b/examples/screenshots/no-imgui-extent_frac_layout.png index cc0a4e6ba..fc66f9c05 100644 --- a/examples/screenshots/no-imgui-extent_frac_layout.png +++ b/examples/screenshots/no-imgui-extent_frac_layout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6567058d5aef3ca5c7b77b1a6b01743235a305d793b6955714c20d681f994f8f -size 158808 +oid sha256:527415b6e9d9e92170471752ba508feb90b50a82e4925228f795c6ddc92b02ca +size 144308 diff --git a/examples/screenshots/no-imgui-extent_layout.png b/examples/screenshots/no-imgui-extent_layout.png index 68342d1c7..87fac1088 100644 --- a/examples/screenshots/no-imgui-extent_layout.png +++ b/examples/screenshots/no-imgui-extent_layout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3a82adc73994400122f8f8b25a9f241352cdb46ecfdbd7f2ee65209d4659bf1 -size 140550 +oid sha256:16b1f946e5678461a64ceaaad967de103e3c6c3706425fc3a4af331fc6874b4d +size 128985 diff --git a/examples/screenshots/no-imgui-gridplot.png b/examples/screenshots/no-imgui-gridplot.png index f2f33bec4..4f3ec0fd2 100644 --- a/examples/screenshots/no-imgui-gridplot.png +++ b/examples/screenshots/no-imgui-gridplot.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0194c56635cba18a34667e087409f01d6c43f73ac1f52a91d31bb466fa4613c1 -size 303365 +oid sha256:f579888d452a84831dae2551ff26fa3ab56d930b399bd7db5f41c6208f775d22 +size 299163 diff --git a/examples/screenshots/no-imgui-gridplot_non_square.png b/examples/screenshots/no-imgui-gridplot_non_square.png index 03d63f7ad..19b1b2088 100644 --- a/examples/screenshots/no-imgui-gridplot_non_square.png +++ b/examples/screenshots/no-imgui-gridplot_non_square.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d4b08a651868fd27329443c6e385fbd2ff1e354ffa5b69e15cb80b724c8dae8 -size 224336 +oid sha256:597bcd71e8be59b6c039251cf6414f1600d53296fd07d6abb71dafd9119d1550 +size 219788 diff --git a/examples/screenshots/no-imgui-gridplot_viewports_check.png b/examples/screenshots/no-imgui-gridplot_viewports_check.png index 5d94d3ec0..0db1e0959 100644 --- a/examples/screenshots/no-imgui-gridplot_viewports_check.png +++ b/examples/screenshots/no-imgui-gridplot_viewports_check.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8feae6c310a5f3faa4fed64804287399c6da6eaa96c237cbd239fd8bb1bf1d4d -size 74948 +oid sha256:ed363583146d44a83f55ad79a08e3ffd01fcbec00c6e8d9939595d87bd21dc4a +size 41628 diff --git a/examples/screenshots/no-imgui-heatmap.png b/examples/screenshots/no-imgui-heatmap.png index ea433a5e7..adc5f67db 100644 --- a/examples/screenshots/no-imgui-heatmap.png +++ b/examples/screenshots/no-imgui-heatmap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8621da2931209b9d9a9908f6d9b40e5dbae0e18397011c17c7ad5d4d056ad56b -size 96368 +oid sha256:fa9967b6148bc7a0b7d5e8688492f65147bf263bc3762a6b53f2feb249297fec +size 92602 diff --git a/examples/screenshots/no-imgui-image_cmap.png b/examples/screenshots/no-imgui-image_cmap.png index 7e0a9394d..6a8019802 100644 --- a/examples/screenshots/no-imgui-image_cmap.png +++ b/examples/screenshots/no-imgui-image_cmap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4437a07e42167ccfd5262648e7f41e7bf647c3493cce4d3a9ce564e91554a904 -size 226825 +oid sha256:4c128d5e0d522156442b38a407f8622991ff54e7bd668e65b2930febf1c43d2c +size 224933 diff --git a/examples/screenshots/no-imgui-image_rgb.png b/examples/screenshots/no-imgui-image_rgb.png index 1fe8b992f..5181f0ce5 100644 --- a/examples/screenshots/no-imgui-image_rgb.png +++ b/examples/screenshots/no-imgui-image_rgb.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe254d9c917404d0beb2c7a77252b19cdc687ddd2f4480f78f381c96657a9fbe -size 251941 +oid sha256:002b3454abe51b48dfcda3bdd4fc64d69ede8f9315656fe1077e75fef91d39e0 +size 250469 diff --git a/examples/screenshots/no-imgui-image_rgbvminvmax.png b/examples/screenshots/no-imgui-image_rgbvminvmax.png index 9ce63bac6..9d7b91f40 100644 --- a/examples/screenshots/no-imgui-image_rgbvminvmax.png +++ b/examples/screenshots/no-imgui-image_rgbvminvmax.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc1f5e72146dafb696a31f180983dc2a06beb874337968217bf8c22d122a0b37 -size 46434 +oid sha256:feda947f567dc4c2d484ca25458520afb8e8eee1ff6e8fb2be32db3b93739d6c +size 43046 diff --git a/examples/screenshots/no-imgui-image_simple.png b/examples/screenshots/no-imgui-image_simple.png index 89da89f25..fdaf65c31 100644 --- a/examples/screenshots/no-imgui-image_simple.png +++ b/examples/screenshots/no-imgui-image_simple.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4727d9ffbe0b54d3e562ec3c4071a2641f94e4e13d3714b8317166e0c58a7316 -size 225876 +oid sha256:c44bb64828621bf1b2074cb5d2409ea81222060ede9d68d7e5354fc8a5e8badb +size 223784 diff --git a/examples/screenshots/no-imgui-image_small.png b/examples/screenshots/no-imgui-image_small.png index 2753047dd..c346ae19c 100644 --- a/examples/screenshots/no-imgui-image_small.png +++ b/examples/screenshots/no-imgui-image_small.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edcd88ffc32388c3ebde4ce42c85a01e0aae6815720cb42c36e025c74dc5c9cb -size 13841 +oid sha256:2a40a4da4f4f83acc4e17223eeb69f3472b07cb9408b8c01a0d786885469e674 +size 11325 diff --git a/examples/screenshots/no-imgui-image_vminvmax.png b/examples/screenshots/no-imgui-image_vminvmax.png index 9ce63bac6..9d7b91f40 100644 --- a/examples/screenshots/no-imgui-image_vminvmax.png +++ b/examples/screenshots/no-imgui-image_vminvmax.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc1f5e72146dafb696a31f180983dc2a06beb874337968217bf8c22d122a0b37 -size 46434 +oid sha256:feda947f567dc4c2d484ca25458520afb8e8eee1ff6e8fb2be32db3b93739d6c +size 43046 diff --git a/examples/screenshots/no-imgui-line.png b/examples/screenshots/no-imgui-line.png index bfaa7c60a..061dc4a8d 100644 --- a/examples/screenshots/no-imgui-line.png +++ b/examples/screenshots/no-imgui-line.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d5d2769550a9a6d0dd17b6d464f4da0ebcba4087108666ddd39c427ad304997 -size 240743 +oid sha256:d75db62e1d6e73604741bfd4c3255fcaeb9061256302a867f0d31525e1924fa8 +size 155225 diff --git a/examples/screenshots/no-imgui-line_cmap.png b/examples/screenshots/no-imgui-line_cmap.png index 5d14d73d3..2b4ac1fc1 100644 --- a/examples/screenshots/no-imgui-line_cmap.png +++ b/examples/screenshots/no-imgui-line_cmap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:37b8fcb208e36f79b490edd8693238c25cbf0f020a819843bb6fc53f7e282afe -size 45898 +oid sha256:77b4423c05e64a2087729106e00ac46157ec949b5074904be7825c8b14d5bd08 +size 36610 diff --git a/examples/screenshots/no-imgui-line_cmap_more.png b/examples/screenshots/no-imgui-line_cmap_more.png index 0ac37b6d1..0fc69ecaa 100644 --- a/examples/screenshots/no-imgui-line_cmap_more.png +++ b/examples/screenshots/no-imgui-line_cmap_more.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a638d611d94fceceb8627139f19b43902e88cf7b96938f5450812cb57d97ba70 -size 114707 +oid sha256:2dbc6f7f47c52c9813562fbe57c5d50635ae447abf3c01fbd4668829bd172305 +size 90316 diff --git a/examples/screenshots/no-imgui-line_collection.png b/examples/screenshots/no-imgui-line_collection.png index d551a73a1..1ce43345f 100644 --- a/examples/screenshots/no-imgui-line_collection.png +++ b/examples/screenshots/no-imgui-line_collection.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8df0832df5660c8e130d4e2a7832348c99dd89a79ff2b5d19cfaec47b1b649d9 -size 91884 +oid sha256:4a31775cb50544545d90db48f77d2c3eba761e1dad16aed60ebf7ef2e4064625 +size 73001 diff --git a/examples/screenshots/no-imgui-line_collection_cmap_values.png b/examples/screenshots/no-imgui-line_collection_cmap_values.png index ef1343f66..f7a10c187 100644 --- a/examples/screenshots/no-imgui-line_collection_cmap_values.png +++ b/examples/screenshots/no-imgui-line_collection_cmap_values.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edaa2958fb04d780c2aad7db30c34a15bffc2865d2a695b9db1d562cf313be16 -size 58711 +oid sha256:1072328cb684bd785fea7726c68633205e91f5d7b1545acc61e9affe9c318e76 +size 37900 diff --git a/examples/screenshots/no-imgui-line_collection_cmap_values_qualitative.png b/examples/screenshots/no-imgui-line_collection_cmap_values_qualitative.png index a999af92e..6f359a994 100644 --- a/examples/screenshots/no-imgui-line_collection_cmap_values_qualitative.png +++ b/examples/screenshots/no-imgui-line_collection_cmap_values_qualitative.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a16b359a174c53977d3b06f61dda3a1059418b3fd5bcded088718e332b92e9f6 -size 63313 +oid sha256:f595b2e350cc646629bddd3df257d6fed37c60e588366b1e2c5e0ecfa84015a8 +size 40677 diff --git a/examples/screenshots/no-imgui-line_collection_colors.png b/examples/screenshots/no-imgui-line_collection_colors.png index 13677914b..b150d6225 100644 --- a/examples/screenshots/no-imgui-line_collection_colors.png +++ b/examples/screenshots/no-imgui-line_collection_colors.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9148b69df1d1e603bc9d179035cdc486952fd1f2788e11cf093a13629fe47e5 -size 49671 +oid sha256:48351bdfefead7fd809564508bf5196edc8805b750a09b913f1b71651ca11cea +size 28560 diff --git a/examples/screenshots/no-imgui-line_collection_slicing.png b/examples/screenshots/no-imgui-line_collection_slicing.png index f23d0e4ad..39b0d9c71 100644 --- a/examples/screenshots/no-imgui-line_collection_slicing.png +++ b/examples/screenshots/no-imgui-line_collection_slicing.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d3b59576ff740247c4cdac40d0b597dbbef24677d07d8895bd6bdff128ec509 -size 117961 +oid sha256:d0c5dc9e6feabf2d61748009ae02a1c34fa81fb1bfd41232075177f7bf185a44 +size 72750 diff --git a/examples/screenshots/no-imgui-line_colorslice.png b/examples/screenshots/no-imgui-line_colorslice.png index fe4ecbd90..a1ac57f50 100644 --- a/examples/screenshots/no-imgui-line_colorslice.png +++ b/examples/screenshots/no-imgui-line_colorslice.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c89e2f45407beaf0b6b90ec61b11288b2fe1fb5d05c650e6e752c116dbea69b9 -size 52481 +oid sha256:203d8f4f6348e7fee0e374f8721c0cd3ca5e796fba9d15fb757c8b3b6b0e81cc +size 41064 diff --git a/examples/screenshots/no-imgui-line_dataslice.png b/examples/screenshots/no-imgui-line_dataslice.png index b7b39c801..795781388 100644 --- a/examples/screenshots/no-imgui-line_dataslice.png +++ b/examples/screenshots/no-imgui-line_dataslice.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b7bb624ee72480a5bb0d1d196d1ccebd8d0b71fb252ddaa1e185bbf9718431a -size 68628 +oid sha256:d7857e80f3a9c1a8e100f2e34c4181cf694efd190be87d0ad39b675d1594bf77 +size 43603 diff --git a/examples/screenshots/no-imgui-line_stack.png b/examples/screenshots/no-imgui-line_stack.png index 4c6419068..c8c76c66e 100644 --- a/examples/screenshots/no-imgui-line_stack.png +++ b/examples/screenshots/no-imgui-line_stack.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a52cfae62bd5f77799faf6316a2d7de848890b9ac46ced9e1e0fc24c6112bbbc -size 106908 +oid sha256:58b9b4b15262cccaa67ddafdecbed8a38e1a3391a73ec4ab372fba58ac534391 +size 55076 diff --git a/examples/screenshots/no-imgui-linear_region_selectors_match_offsets.png b/examples/screenshots/no-imgui-linear_region_selectors_match_offsets.png index 82aca044b..74006a70b 100644 --- a/examples/screenshots/no-imgui-linear_region_selectors_match_offsets.png +++ b/examples/screenshots/no-imgui-linear_region_selectors_match_offsets.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b556ae7316ca24188cdadae410f501f3f2a86d00b004ed3ef26167ea5ba4f990 -size 96191 +oid sha256:e35aafe0f4f2527dfa2ef7ac2a80dd55a6e0418ac0427ac9e4bb1ba86b95de8f +size 60559 diff --git a/examples/screenshots/no-imgui-linear_selector.png b/examples/screenshots/no-imgui-linear_selector.png index 13125d504..4152fb23c 100644 --- a/examples/screenshots/no-imgui-linear_selector.png +++ b/examples/screenshots/no-imgui-linear_selector.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f49a58a0e259f45e2e2fa9e311f9e05baafbd62a6d089a3c83167f8779e17cd5 -size 142585 +oid sha256:c9fc51ee3954815c291d117f5b8e7e80bd3a312207dba5e51d7fffd6e532287b +size 104130 diff --git a/examples/screenshots/no-imgui-rect_frac_layout.png b/examples/screenshots/no-imgui-rect_frac_layout.png index cc0a4e6ba..fc66f9c05 100644 --- a/examples/screenshots/no-imgui-rect_frac_layout.png +++ b/examples/screenshots/no-imgui-rect_frac_layout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6567058d5aef3ca5c7b77b1a6b01743235a305d793b6955714c20d681f994f8f -size 158808 +oid sha256:527415b6e9d9e92170471752ba508feb90b50a82e4925228f795c6ddc92b02ca +size 144308 diff --git a/examples/screenshots/no-imgui-rect_layout.png b/examples/screenshots/no-imgui-rect_layout.png index 68342d1c7..87fac1088 100644 --- a/examples/screenshots/no-imgui-rect_layout.png +++ b/examples/screenshots/no-imgui-rect_layout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3a82adc73994400122f8f8b25a9f241352cdb46ecfdbd7f2ee65209d4659bf1 -size 140550 +oid sha256:16b1f946e5678461a64ceaaad967de103e3c6c3706425fc3a4af331fc6874b4d +size 128985 diff --git a/examples/screenshots/no-imgui-scatter_cmap_iris.png b/examples/screenshots/no-imgui-scatter_cmap_iris.png index 41393517c..d5280bdb5 100644 --- a/examples/screenshots/no-imgui-scatter_cmap_iris.png +++ b/examples/screenshots/no-imgui-scatter_cmap_iris.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0d4cbc55085805b98e8ace0248ccc7afc6a9496f79f3f3c69ffe97d4962e6f3 -size 55639 +oid sha256:191963308144dd97037e26f9b26ea97e0af1a1645f929777bd82931925e954c3 +size 43850 diff --git a/examples/screenshots/no-imgui-scatter_colorslice_iris.png b/examples/screenshots/no-imgui-scatter_colorslice_iris.png index e148c70df..7eab4a984 100644 --- a/examples/screenshots/no-imgui-scatter_colorslice_iris.png +++ b/examples/screenshots/no-imgui-scatter_colorslice_iris.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52ba9a0cb355ca13549e0e4d80f0ea544192efe6783cc4615c74be01c9930abb -size 30285 +oid sha256:354e8137170a14df5aaa9c1b28ce16e29e48d8e7f103cb2d3dd760cd148e6462 +size 24218 diff --git a/examples/screenshots/no-imgui-scatter_dataslice_iris.png b/examples/screenshots/no-imgui-scatter_dataslice_iris.png index dbf6088e6..5a830f181 100644 --- a/examples/screenshots/no-imgui-scatter_dataslice_iris.png +++ b/examples/screenshots/no-imgui-scatter_dataslice_iris.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d2d3c95520c0025c1bdc408ed307d33793c409168a6cc80971bbc00210eda4d4 -size 33735 +oid sha256:1da7bfe315865d3eb481fa8d9b191abf6ab326d73abdd352f750c6c21ff1c99d +size 26311 diff --git a/examples/screenshots/no-imgui-scatter_iris.png b/examples/screenshots/no-imgui-scatter_iris.png index e63267a49..aeb4850eb 100644 --- a/examples/screenshots/no-imgui-scatter_iris.png +++ b/examples/screenshots/no-imgui-scatter_iris.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c5826717eed9a8c44361a760ee31273a510ca0dcdc07cd98957aa1b8445be62a -size 33043 +oid sha256:dd1cd6c957c83abdd8832fdc47640c5a525af6121c48993c194ecd1780aef770 +size 25669 diff --git a/examples/screenshots/no-imgui-scatter_size.png b/examples/screenshots/no-imgui-scatter_size.png index 47b8e4ad8..47b4fe61a 100644 --- a/examples/screenshots/no-imgui-scatter_size.png +++ b/examples/screenshots/no-imgui-scatter_size.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bcef646cf7587c886a3765df2525d662caf6ad6db08e21c310bd2109b80e1673 -size 65092 +oid sha256:ed4c1c689eb446bed9f5ce016161f67e5bd3975f66731ec58ee13626ad9dccb9 +size 42266 diff --git a/examples/screenshots/rect_frac_layout.png b/examples/screenshots/rect_frac_layout.png index 1df76dc61..3059e78d0 100644 --- a/examples/screenshots/rect_frac_layout.png +++ b/examples/screenshots/rect_frac_layout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc8ec12042a36992dbda00d04f251b47d58cd6d75eca5c4240cd207878f9282f -size 157607 +oid sha256:fa5563fc8bd9f7b24f3f25a98aa1ce6de3afea9b5c1f1cd7cc580fa4866fe796 +size 144210 diff --git a/examples/screenshots/rect_layout.png b/examples/screenshots/rect_layout.png index fa89b9afc..23303dd28 100644 --- a/examples/screenshots/rect_layout.png +++ b/examples/screenshots/rect_layout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:823785f993237cb0f2773aea62c3dbbe16fe63f86f83867f1e27b82c8793da9f -size 126051 +oid sha256:e1716c3f2e1309643a53759e9b5226440c9ac2e6be930f52439305a91c5ca914 +size 117466 diff --git a/examples/screenshots/scatter_cmap_iris.png b/examples/screenshots/scatter_cmap_iris.png index 3e0ccbe98..e8c87cdfc 100644 --- a/examples/screenshots/scatter_cmap_iris.png +++ b/examples/screenshots/scatter_cmap_iris.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a58f072bb440b9f7e36ceb33405caa30bae419089781cc5c5c67f1381811165 -size 56500 +oid sha256:3b71e5397b6eebff7ad540463515e0cba15cf8d4a9c63a2303d737c8f199c7d8 +size 45051 diff --git a/examples/screenshots/scatter_colorslice_iris.png b/examples/screenshots/scatter_colorslice_iris.png index f6c5cbff7..d7271ce71 100644 --- a/examples/screenshots/scatter_colorslice_iris.png +++ b/examples/screenshots/scatter_colorslice_iris.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b4516dd73a4a2dd916fa4e89d4ddfaf6206178a0842710b43cc0349fa2334ab -size 31079 +oid sha256:d4f95d45d58779e7afe2b6898621c3e8d46c2dadc04406ed9ffa09c8c84c19b3 +size 25582 diff --git a/examples/screenshots/scatter_dataslice_iris.png b/examples/screenshots/scatter_dataslice_iris.png index cd61ff899..65599a790 100644 --- a/examples/screenshots/scatter_dataslice_iris.png +++ b/examples/screenshots/scatter_dataslice_iris.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a97f3553a4ed9b99ae88db79233974dbb397449b63cd6b70b6a6d75a2e5e16d1 -size 34551 +oid sha256:a39a4a3f705c3dff50c3dad0a70d3d8412e5a5672169c7a68b90abb6030861bc +size 27533 diff --git a/examples/screenshots/scatter_iris.png b/examples/screenshots/scatter_iris.png index 71d440b2a..b74c04a06 100644 --- a/examples/screenshots/scatter_iris.png +++ b/examples/screenshots/scatter_iris.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5081e95875350a2bda9db3f8c0cc2ec89abf4aca3e9a19b9c3959dd98206a77c -size 33853 +oid sha256:862d8d1c5025add59f37206b88184eee8977ef6f9ada4518013c8270459288d7 +size 26977 diff --git a/examples/screenshots/scatter_size.png b/examples/screenshots/scatter_size.png index 0bbe9650f..c0867d92c 100644 --- a/examples/screenshots/scatter_size.png +++ b/examples/screenshots/scatter_size.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec78314216b2add21820209e5d2bfabf9f652b3b393d80f7e5be8341e42d19e6 -size 67328 +oid sha256:f67e1ad8120b2077002459917e99cd3e80a9b1ccc55e76923f2d86c791c8100d +size 44273 diff --git a/examples/selection_tools/polygon_selector.py b/examples/selection_tools/polygon_selector.py index 9b1d0fbac..b43b34811 100644 --- a/examples/selection_tools/polygon_selector.py +++ b/examples/selection_tools/polygon_selector.py @@ -13,9 +13,7 @@ from itertools import product # create a figure -figure = fpl.Figure( - size=(700, 560) -) +figure = fpl.Figure(size=(700, 560)) # generate some data @@ -39,7 +37,9 @@ def make_circle(center, radius: float, n_points: int = 75) -> np.ndarray: line_collection = figure[0, 0].add_line_collection(circles, cmap="jet", thickness=5) # add polygon selector to image graphic -polygon_selector = line_collection.add_polygon_selector(fill_color="#ff00ff22", edge_color="#FFF", vertex_color="#FFF") +polygon_selector = line_collection.add_polygon_selector( + fill_color="#ff00ff", edge_color="#FFF", vertex_color="#FFF" +) # add event handler to highlight selected indices diff --git a/examples/tests/test_examples.py b/examples/tests/test_examples.py index c0cdffbd7..105325b3d 100644 --- a/examples/tests/test_examples.py +++ b/examples/tests/test_examples.py @@ -61,12 +61,12 @@ def prep_environment(): # Make that examples using rendercanvas.auto, will use the offscreen backend os.environ["RENDERCANVAS_FORCE_OFFSCREEN"] = "true" # Disable ppaa on the renderer by default. Otherwise all screenshots change when the ppaa shaders are updated. - os.environ["PYGFX_PPAA"] = "none" + os.environ["PYGFX_DEFAULT_PPAA"] = "none" try: yield finally: del os.environ["RENDERCANVAS_FORCE_OFFSCREEN"] - del os.environ["PYGFX_PPAA"] + del os.environ["PYGFX_DEFAULT_PPAA"] def test_that_we_are_on_lavapipe(): @@ -207,6 +207,6 @@ def get_diffs_rgba(slicer): if __name__ == "__main__": os.environ["RENDERCANVAS_FORCE_OFFSCREEN"] = "true" - os.environ["PYGFX_PPAA"] = "none" + os.environ["PYGFX_DEFAULT_PPAA"] = "none" test_examples_run("simple") test_example_screenshots("simple") diff --git a/fastplotlib/graphics/_axes.py b/fastplotlib/graphics/_axes.py index 10774fc2a..8063e2819 100644 --- a/fastplotlib/graphics/_axes.py +++ b/fastplotlib/graphics/_axes.py @@ -3,6 +3,8 @@ import pygfx from pylinalg import quat_from_vecs, vec_transform_quat +from ..utils.enums import RenderQueue + GRID_PLANES = ["xy", "xz", "yz"] @@ -181,9 +183,15 @@ def __init__( } # create ruler for each dim - self._x = pygfx.Ruler(**x_kwargs) - self._y = pygfx.Ruler(**y_kwargs) - self._z = pygfx.Ruler(**z_kwargs) + self._x = pygfx.Ruler(alpha_mode="solid", **x_kwargs) + self._y = pygfx.Ruler(alpha_mode="solid", **y_kwargs) + self._z = pygfx.Ruler(alpha_mode="solid", **z_kwargs) + + # We render the lines and ticks as solid, but enable aa for text for prettier glyphs + for ruler in self._x, self._y, self._z: + ruler.text.material.alpha_mode = "auto" + ruler.text.material.render_queue = RenderQueue.auto + 50 + ruler.text.material.aa = True self._offset = offset @@ -226,15 +234,23 @@ def __init__( if grid_kwargs is None: grid_kwargs = dict() - grid_kwargs = { - "major_step": 10, - "minor_step": 1, - "thickness_space": "screen", - "major_thickness": 2, - "minor_thickness": 0.5, - "infinite": True, + # The grid is a bit weird, because it makes use of transparency to fade off in the distance. + # But w want it to write depth, so that objects that are drawn behind it are partually hidden. + # So we set alha_mode to 'auto'. We make it draw earlier than other 'auto' objects, under the + # assumption that most interesting stuff is in front of the grid, and artifacts behind the grid are less + # bad than those in front. Note that fully opaque objects blend perfectly fine with the grid. Artifacts + # should only emerge for objects that have semi-transparent fragments. + grid_kwargs = dict( + alpha_mode="auto", + render_queue=RenderQueue.auto + 50, + major_step=10, + minor_step=1, + thickness_space="screen", + major_thickness=2, + minor_thickness=0.5, + infinite=True, **grid_kwargs, - } + ) if grids: _grids = dict() diff --git a/fastplotlib/graphics/_base.py b/fastplotlib/graphics/_base.py index bc3486696..ab58c7a5c 100644 --- a/fastplotlib/graphics/_base.py +++ b/fastplotlib/graphics/_base.py @@ -5,7 +5,7 @@ import numpy as np import pylinalg as la -from wgpu.gui.base import log_exception +from rendercanvas.base import log_exception try: from imgui_bundle import imgui @@ -22,6 +22,8 @@ Name, Offset, Rotation, + Alpha, + AlphaMode, Visible, ) from ._axes import Axes @@ -67,6 +69,8 @@ def __init_subclass__(cls, **kwargs): "name": Name, "offset": Offset, "rotation": Rotation, + "alpha": Alpha, + "alpha_mode": AlphaMode, "visible": Visible, "deleted": Deleted, } @@ -77,6 +81,8 @@ def __init__( name: str = None, offset: np.ndarray | list | tuple = (0.0, 0.0, 0.0), rotation: np.ndarray | list | tuple = (0.0, 0.0, 0.0, 1.0), + alpha: float = 1.0, + alpha_mode: str = "auto", visible: bool = True, metadata: Any = None, ): @@ -93,6 +99,29 @@ def __init__( rotation: (float, float, float, float), default (0, 0, 0, 1) rotation quaternion + alpha: (float), default 1.0 + The global alpha value, i.e. opacity, of the graphic. + + The alpha value for the colors. If you make your a graphic transparent, consider setting ``alpha_mode`` + to 'blend' or 'weighted_blend' so it won't write to the depth buffer. + + alpha_mode: (str), default "auto", + The alpha-mode, e.g. 'auto', 'blend', 'weighted_blend', 'solid', or 'dither'. + + * 'solid': the points do not have semi-transparent fragments. Writes to the depth buffer. + * 'auto': like 'solid', but allows semi-transparent fragments. + * 'blend': the points are considered transparent, and don't write to the depth buffer. + The points are blended in the order they are drawn. + * 'weighted_blend': like 'blend', but the result does not depend on the order in which points are rendered, + nor is their distance to the camera. + * 'dither': use stochastic transparency. Although the result is a bit noisy, the points distance to the camera + is properly taken into account, which may be better for 3D point clouds. Writes to the depth buffer. + + For details see https://docs.pygfx.org/stable/transparency.html + + visible: (bool), default True + Whether the graphic is visible. + metadata: Any, optional metadata attached to this Graphic, this is for the user to manage @@ -119,6 +148,8 @@ def __init__( self._deleted = Deleted(False) self._rotation = Rotation(rotation) self._offset = Offset(offset) + self._alpha = Alpha(alpha) + self._alpha_mode = AlphaMode(alpha_mode) self._visible = Visible(visible) self._block_events = False @@ -158,6 +189,24 @@ def rotation(self) -> np.ndarray: def rotation(self, value: np.ndarray | list | tuple): self._rotation.set_value(self, value) + @property + def alpha(self) -> float: + """The opacity of the graphic""" + return self._alpha.value + + @alpha.setter + def alpha(self, value: float): + self._alpha.set_value(self, value) + + @property + def alpha_mode(self) -> str: + """How the alpha is handled by the renderer""" + return self._alpha_mode.value + + @alpha_mode.setter + def alpha_mode(self, value: str): + self._alpha_mode.set_value(self, value) + @property def visible(self) -> bool: """Whether the graphic is visible""" @@ -194,14 +243,17 @@ def world_object(self) -> pygfx.WorldObject: def _set_world_object(self, wo: pygfx.WorldObject): WORLD_OBJECTS[self._fpl_address] = wo - self.world_object.visible = self.visible + wo.visible = self.visible + if wo.material is not None: + wo.material.opacity = self.alpha + wo.material.alpha_mode = self.alpha_mode # set offset if it's not (0., 0., 0.) - if not all(self.world_object.world.position == self.offset): + if not all(wo.world.position == self.offset): self.offset = self.offset # set rotation if it's not (0., 0., 0., 1.) - if not all(self.world_object.world.rotation == self.rotation): + if not all(wo.world.rotation == self.rotation): self.rotation = self.rotation @property @@ -460,8 +512,7 @@ def right_click_menu(self): def right_click_menu(self, menu): if not IMGUI: raise ImportError( - "imgui is required to set right-click menus:\n" - "pip install imgui_bundle" + "imgui is required to set right-click menus:\npip install imgui_bundle" ) self._right_click_menu = menu diff --git a/fastplotlib/graphics/_positions_base.py b/fastplotlib/graphics/_positions_base.py index 4a4f5a797..143c4cc85 100644 --- a/fastplotlib/graphics/_positions_base.py +++ b/fastplotlib/graphics/_positions_base.py @@ -46,7 +46,7 @@ def colors(self, value: str | np.ndarray | tuple[float] | list[float] | list[str @property def cmap(self) -> VertexCmap: """ - Control the cmap, cmap transform, or cmap alpha + Control the cmap or cmap transform For supported colormaps see the ``cmap`` library catalogue: https://cmap-docs.readthedocs.io/en/stable/catalog/ """ @@ -77,7 +77,6 @@ def __init__( data: Any, colors: str | np.ndarray | tuple[float] | list[float] | list[str] = "w", uniform_color: bool = False, - alpha: float = 1.0, cmap: str | VertexCmap = None, cmap_transform: np.ndarray = None, isolated_buffer: bool = True, @@ -112,7 +111,6 @@ def __init__( self._colors, cmap_name=cmap, transform=cmap_transform, - alpha=alpha, ) elif isinstance(cmap, VertexCmap): # use existing cmap instance @@ -129,9 +127,7 @@ def __init__( self._colors = colors self._colors._shared += 1 # blank colormap instance - self._cmap = VertexCmap( - self._colors, cmap_name=None, transform=None, alpha=alpha - ) + self._cmap = VertexCmap(self._colors, cmap_name=None, transform=None) else: if uniform_color: if not isinstance(colors, str): # not a single color @@ -139,16 +135,14 @@ def __init__( raise TypeError( "must pass a single color if using `uniform_colors=True`" ) - self._colors = UniformColor(colors, alpha=alpha) + self._colors = UniformColor(colors) self._cmap = None else: self._colors = VertexColors( - colors, - n_colors=self._data.value.shape[0], - alpha=alpha, + colors, n_colors=self._data.value.shape[0] ) self._cmap = VertexCmap( - self._colors, cmap_name=None, transform=None, alpha=alpha + self._colors, cmap_name=None, transform=None ) self._size_space = SizeSpace(size_space) diff --git a/fastplotlib/graphics/features/__init__.py b/fastplotlib/graphics/features/__init__.py index 18bcf5187..086efd546 100644 --- a/fastplotlib/graphics/features/__init__.py +++ b/fastplotlib/graphics/features/__init__.py @@ -36,7 +36,7 @@ LinearRegionSelectionFeature, RectangleSelectionFeature, ) -from ._common import Name, Offset, Rotation, Visible, Deleted +from ._common import Name, Offset, Rotation, Alpha, AlphaMode, Visible, Deleted __all__ = [ @@ -65,6 +65,8 @@ "Name", "Offset", "Rotation", + "Alpha", + "AlphaMode", "Visible", "Deleted", "GraphicFeatureEvent", diff --git a/fastplotlib/graphics/features/_base.py b/fastplotlib/graphics/features/_base.py index d32904ae5..153f6aad2 100644 --- a/fastplotlib/graphics/features/_base.py +++ b/fastplotlib/graphics/features/_base.py @@ -4,7 +4,7 @@ import numpy as np from numpy.typing import NDArray -from wgpu.gui.base import log_exception +from rendercanvas.base import log_exception import pygfx @@ -318,7 +318,7 @@ def __len__(self): raise NotImplementedError def __repr__(self): - return f"{self.__class__.__name__} buffer data:\n" f"{self.value.__repr__()}" + return f"{self.__class__.__name__} buffer data:\n{self.value.__repr__()}" def block_reentrance(set_value): diff --git a/fastplotlib/graphics/features/_common.py b/fastplotlib/graphics/features/_common.py index 884cd0109..646ee6945 100644 --- a/fastplotlib/graphics/features/_common.py +++ b/fastplotlib/graphics/features/_common.py @@ -127,6 +127,60 @@ def set_value(self, graphic, value: np.ndarray | list | tuple): self._call_event_handlers(event) +class Alpha(GraphicFeature): + """The alpha value (i.e. opacity) of a graphic.""" + + property_name = "alpha" + event_info_spec = [ + {"dict key": "value", "type": "float", "description": "new alpha value"}, + ] + + def __init__(self, value: float): + self._value = value + super().__init__() + + @property + def value(self) -> float: + return self._value + + @block_reentrance + def set_value(self, graphic, value: float): + wo = graphic.world_object + if wo.material is not None: + wo.material.opacity = value + self._value = value + + event = GraphicFeatureEvent(type="alpha", info={"value": value}) + self._call_event_handlers(event) + + +class AlphaMode(GraphicFeature): + """The alpha-mode value of a graphic (i.e. how alpha is handled by the renderer).""" + + property_name = "alpha_mode" + event_info_spec = [ + {"dict key": "value", "type": "str", "description": "new alpha mode"}, + ] + + def __init__(self, value: str): + self._value = value + super().__init__() + + @property + def value(self) -> str: + return self._value + + @block_reentrance + def set_value(self, graphic, value: str): + wo = graphic.world_object + if wo.material is not None: + wo.alpha_mode = value + self._value = value + + event = GraphicFeatureEvent(type="alpha_mode", info={"value": value}) + self._call_event_handlers(event) + + class Visible(GraphicFeature): """Access or change the visibility.""" diff --git a/fastplotlib/graphics/features/_positions_graphics.py b/fastplotlib/graphics/features/_positions_graphics.py index 868701079..21202cdf3 100644 --- a/fastplotlib/graphics/features/_positions_graphics.py +++ b/fastplotlib/graphics/features/_positions_graphics.py @@ -40,7 +40,6 @@ def __init__( self, colors: str | np.ndarray | tuple[float] | list[float] | list[str], n_colors: int, - alpha: float = None, isolated_buffer: bool = True, ): """ @@ -55,11 +54,8 @@ def __init__( n_colors: int number of colors, if passing in a single str or single RGBA array - alpha: float, optional - alpha value for the colors - """ - data = parse_colors(colors, n_colors, alpha) + data = parse_colors(colors, n_colors) super().__init__(data=data, isolated_buffer=isolated_buffer) @@ -158,13 +154,10 @@ class UniformColor(GraphicFeature): }, ] - def __init__( - self, value: str | np.ndarray | tuple | list | pygfx.Color, alpha: float = 1.0 - ): + def __init__(self, value: str | np.ndarray | tuple | list | pygfx.Color): """Manages uniform color for line or scatter material""" - v = (*tuple(pygfx.Color(value))[:-1], alpha) # apply alpha - self._value = pygfx.Color(v) + self._value = pygfx.Color(value) super().__init__() @property @@ -427,7 +420,6 @@ def __init__( vertex_colors: VertexColors, cmap_name: str | None, transform: np.ndarray | None, - alpha: float = 1.0, ): """ Sliceable colormap feature, manages a VertexColors instance and @@ -439,7 +431,6 @@ def __init__( self._vertex_colors = vertex_colors self._cmap_name = cmap_name self._transform = transform - self._alpha = alpha if self._cmap_name is not None: if not isinstance(self._cmap_name, str): @@ -457,7 +448,6 @@ def __init__( cmap_name=self._cmap_name, transform=self._transform, ) - colors[:, -1] = alpha # set vertex colors from cmap self._vertex_colors[:] = colors @@ -481,7 +471,6 @@ def __setitem__(self, key: slice, cmap_name): colors = parse_cmap_values( n_colors=n_elements, cmap_name=cmap_name, transform=self._transform ) - colors[:, -1] = self.alpha self._cmap_name = cmap_name self._vertex_colors[key] = colors @@ -517,8 +506,6 @@ def transform( n_colors=self.value.shape[0], cmap_name=self._cmap_name, transform=values ) - colors[:, -1] = self.alpha - self._transform = values if indices is None: @@ -528,18 +515,6 @@ def transform( self._emit_event("cmap.transform", indices, values) - @property - def alpha(self) -> float: - """Get or set the alpha level""" - return self._alpha - - @alpha.setter - def alpha(self, value: float, indices: slice | list | np.ndarray = None): - self._vertex_colors[indices, -1] = value - self._alpha = value - - self._emit_event("cmap.alpha", indices, value) - def __len__(self): raise NotImplementedError( "len not implemented for `cmap`, use len(colors) instead" diff --git a/fastplotlib/graphics/features/utils.py b/fastplotlib/graphics/features/utils.py index e2f6e3428..408610e1e 100644 --- a/fastplotlib/graphics/features/utils.py +++ b/fastplotlib/graphics/features/utils.py @@ -6,9 +6,7 @@ def parse_colors( - colors: str | np.ndarray | list[str] | tuple[str], - n_colors: int | None, - alpha: float | None = None, + colors: str | np.ndarray | list[str] | tuple[str], n_colors: int | None ): """ @@ -16,8 +14,6 @@ def parse_colors( ---------- colors n_colors - alpha - key Returns ------- @@ -30,20 +26,22 @@ def parse_colors( colors = colors.tolist() # if the color is provided as a numpy array if isinstance(colors, np.ndarray): - if colors.shape == (4,): # single RGBA array + if colors.shape == (3,): # single RGB array + data = np.repeat(np.array([colors]), n_colors, axis=0) + elif colors.shape == (4,): # single RGBA array data = np.repeat(np.array([colors]), n_colors, axis=0) # else assume it's already a stack of RGBA arrays, keep this directly as the data elif colors.ndim == 2: - if colors.shape[1] != 4 and colors.shape[0] != n_colors: + if not (colors.shape[1] in (3, 4) and colors.shape[0] == n_colors): raise ValueError( "Valid array color arguments must be a single RGBA array or a stack of " - "RGBA arrays for each datapoint in the shape [n_datapoints, 4]" + "RGB or RGBA arrays for each datapoint in the shape [n_datapoints, 3] or [n_datapoints, 4]" ) data = colors else: raise ValueError( - "Valid array color arguments must be a single RGBA array or a stack of " - "RGBA arrays for each datapoint in the shape [n_datapoints, 4]" + "Valid array color arguments must be a single RGB(A) array or a stack of " + "RGB(A) arrays for each datapoint in the shape [n_datapoints, 3] or [n_datapoints, 4]" ) # if the color is provided as list or tuple @@ -58,8 +56,8 @@ def parse_colors( data = np.vstack([np.array(pygfx.Color(c)) for c in colors]) - # if it's a single RGBA array as a tuple/list - elif len(colors) == 4: + # if it's a single RGB/RGBA array as a tuple/list + elif len(colors) in (3, 4): c = pygfx.Color(colors) data = np.repeat(np.array([c]), n_colors, axis=0) @@ -70,18 +68,11 @@ def parse_colors( ) elif isinstance(colors, str): if colors == "random": - data = np.random.rand(n_colors, 4) - data[:, -1] = alpha + data = np.random.rand(n_colors, 3) else: data = make_pygfx_colors(colors, n_colors) else: # assume it's a single color, use pygfx.Color to parse it data = make_pygfx_colors(colors, n_colors) - if alpha is not None: - if isinstance(alpha, float): - data[:, -1] = alpha - else: - raise TypeError("if alpha is provided it must be of type `float`") - return to_gpu_supported_dtype(data) diff --git a/fastplotlib/graphics/line.py b/fastplotlib/graphics/line.py index 7e6ecee93..bd3bbc397 100644 --- a/fastplotlib/graphics/line.py +++ b/fastplotlib/graphics/line.py @@ -37,7 +37,6 @@ def __init__( thickness: float = 2.0, colors: str | np.ndarray | Sequence = "w", uniform_color: bool = False, - alpha: float = 1.0, cmap: str = None, cmap_transform: np.ndarray | Sequence = None, isolated_buffer: bool = True, @@ -66,9 +65,6 @@ def __init__( if True, uses a uniform buffer for the line color, basically saves GPU VRAM when the entire line has a single color - alpha: float, optional, default 1.0 - alpha value for the colors - cmap: str, optional Apply a colormap to the line instead of assigning colors manually, this overrides any argument passed to "colors". For supported colormaps see the @@ -89,7 +85,6 @@ def __init__( data=data, colors=colors, uniform_color=uniform_color, - alpha=alpha, cmap=cmap, cmap_transform=cmap_transform, isolated_buffer=isolated_buffer, @@ -104,9 +99,12 @@ def __init__( else: MaterialCls = pygfx.LineMaterial + aa = kwargs.get("alpha_mode", "auto") in ("blend", "weighted_blend") + if uniform_color: geometry = pygfx.Geometry(positions=self._data.buffer) material = MaterialCls( + aa=aa, thickness=self.thickness, color_mode="uniform", color=self.colors, @@ -115,6 +113,7 @@ def __init__( ) else: material = MaterialCls( + aa=aa, thickness=self.thickness, color_mode="vertex", pick_write=True, diff --git a/fastplotlib/graphics/line_collection.py b/fastplotlib/graphics/line_collection.py index ad4bf74d5..3d183593a 100644 --- a/fastplotlib/graphics/line_collection.py +++ b/fastplotlib/graphics/line_collection.py @@ -72,7 +72,7 @@ def cmap(self) -> CollectionFeature: """ Get or set a cmap along the line collection. - Optionally set using a tuple ("cmap", , ) to set the transform and/or alpha. + Optionally set using a tuple ("cmap", ) to set the transform.. Example: line_collection.cmap = ("jet", sine_transform_vals, 0.7) @@ -84,23 +84,20 @@ def cmap(self) -> CollectionFeature: def cmap(self, args): if isinstance(args, str): name = args - transform, alpha = None, 1.0 + transform = None elif len(args) == 1: name = args[0] - transform, alpha = None, None - + transform = None elif len(args) == 2: name, transform = args - alpha = None - - elif len(args) == 3: - name, transform, alpha = args + else: + raise ValueError( + "Too many values for cmap (note that alpha is deprecated, set alpha on the graphic instead)" + ) - colors = parse_cmap_values( + self.colors = parse_cmap_values( n_colors=len(self), cmap_name=name, transform=transform ) - colors[:, -1] = alpha - self.colors = colors @property def thickness(self) -> np.ndarray: @@ -132,7 +129,6 @@ def __init__( thickness: float | Sequence[float] = 2.0, colors: str | Sequence[str] | np.ndarray | Sequence[np.ndarray] = "w", uniform_colors: bool = False, - alpha: float = 1.0, cmap: Sequence[str] | str = None, cmap_transform: np.ndarray | List = None, name: str = None, @@ -164,9 +160,6 @@ def __init__( | if ``list`` of ``str``, represents color for each individual line, example ["w", "b", "r",...] | if ``RGBA array`` of shape [data_size, 4], represents a single RGBA array for each line - alpha: float, optional - alpha value for colors, if colors is a ``str`` - cmap: Iterable of str or str, optional | if ``str``, single cmap will be used for all lines | if ``list`` of ``str``, each cmap will apply to the individual lines @@ -253,7 +246,7 @@ def __init__( else: if isinstance(colors, np.ndarray): # single color for all lines in the collection as RGBA - if colors.shape == (4,): + if colors.shape in [(3,), (4,)]: single_color = True # colors specified for each line as array of shape [n_lines, RGBA] @@ -268,8 +261,7 @@ def __init__( elif isinstance(colors, str): if colors == "random": - colors = np.random.rand(len(data), 4) - colors[:, -1] = alpha + colors = np.random.rand(len(data), 3) single_color = False else: # parse string color @@ -568,7 +560,6 @@ def __init__( data: List[np.ndarray], thickness: float | Iterable[float] = 2.0, colors: str | Iterable[str] | np.ndarray | Iterable[np.ndarray] = "w", - alpha: float = 1.0, cmap: Iterable[str] | str = None, cmap_transform: np.ndarray | List = None, name: str = None, @@ -602,9 +593,6 @@ def __init__( | if ``list`` of ``str``, represents color for each individual line, example ["w", "b", "r",...] | if ``RGBA array`` of shape [data_size, 4], represents a single RGBA array for each line - alpha: float, optional - alpha value for colors, if colors is a ``str`` - cmap: Iterable of str or str, optional | if ``str``, single cmap will be used for all lines | if ``list`` of ``str``, each cmap will apply to the individual lines @@ -646,7 +634,6 @@ def __init__( data=data, thickness=thickness, colors=colors, - alpha=alpha, cmap=cmap, cmap_transform=cmap_transform, name=name, diff --git a/fastplotlib/graphics/scatter.py b/fastplotlib/graphics/scatter.py index b31022f5b..73095714b 100644 --- a/fastplotlib/graphics/scatter.py +++ b/fastplotlib/graphics/scatter.py @@ -29,7 +29,6 @@ def __init__( data: Any, colors: str | np.ndarray | tuple[float] | list[float] | list[str] = "w", uniform_color: bool = False, - alpha: float = 1.0, cmap: str = None, cmap_transform: np.ndarray = None, isolated_buffer: bool = True, @@ -55,9 +54,6 @@ def __init__( if True, uses a uniform buffer for the scatter point colors. Useful if you need to save GPU VRAM when all points have the same color. - alpha: float, optional, default 1.0 - alpha value for the colors - cmap: str, optional apply a colormap to the scatter instead of assigning colors manually, this overrides any argument passed to "colors". For supported colormaps see the @@ -89,7 +85,6 @@ def __init__( data=data, colors=colors, uniform_color=uniform_color, - alpha=alpha, cmap=cmap, cmap_transform=cmap_transform, isolated_buffer=isolated_buffer, @@ -99,8 +94,13 @@ def __init__( n_datapoints = self.data.value.shape[0] + aa = kwargs.get("alpha_mode", "auto") in ("blend", "weighted_blend") + geo_kwargs = {"positions": self._data.buffer} - material_kwargs = {"pick_write": True} + material_kwargs = dict( + pick_write=True, + aa=aa, + ) self._size_space = SizeSpace(size_space) if uniform_color: diff --git a/fastplotlib/graphics/selectors/_linear.py b/fastplotlib/graphics/selectors/_linear.py index 64a673768..033736a5f 100644 --- a/fastplotlib/graphics/selectors/_linear.py +++ b/fastplotlib/graphics/selectors/_linear.py @@ -5,6 +5,7 @@ import numpy as np import pygfx +from ...utils.enums import RenderQueue from .._base import Graphic from .._collection_base import GraphicCollection from ..features._selection_features import LinearSelectionFeature @@ -145,17 +146,34 @@ def __init__( line_inner = pygfx.Line( # self.data.feature_data because data is a Buffer geometry=pygfx.Geometry(positions=line_data), - material=material(thickness=thickness, color=edge_color, pick_write=True), + material=material( + thickness=thickness, + color=edge_color, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + pick_write=True, + ), ) self.line_outer = pygfx.Line( geometry=pygfx.Geometry(positions=line_data), material=material( - thickness=thickness + 6, color=self.colors_outer, pick_write=True + thickness=thickness + 6, + color=self.colors_outer, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + pick_write=True, ), ) - line_inner.world.z = self.line_outer.world.z + 1 + # Inner line goes on top of the outer line + line_inner.render_order = 1 world_object = pygfx.Group() diff --git a/fastplotlib/graphics/selectors/_linear_region.py b/fastplotlib/graphics/selectors/_linear_region.py index e93e2a147..ee6849144 100644 --- a/fastplotlib/graphics/selectors/_linear_region.py +++ b/fastplotlib/graphics/selectors/_linear_region.py @@ -8,6 +8,7 @@ from .._collection_base import GraphicCollection from ..features._selection_features import LinearRegionSelectionFeature from ._base_selector import BaseSelector, MoveInfo +from ...utils.enums import RenderQueue class LinearRegionSelector(BaseSelector): @@ -140,7 +141,13 @@ def __init__( mesh = pygfx.Mesh( pygfx.box_geometry(1, size, 1), pygfx.MeshBasicMaterial( - color=pygfx.Color(self.fill_color), pick_write=True + color=pygfx.Color(self.fill_color), + alpha_mode="blend", + opacity=0.4, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + pick_write=True, ), ) @@ -148,12 +155,21 @@ def __init__( mesh = pygfx.Mesh( pygfx.box_geometry(size, 1, 1), pygfx.MeshBasicMaterial( - color=pygfx.Color(self.fill_color), pick_write=True + color=pygfx.Color(self.fill_color), + alpha_mode="blend", + opacity=0.4, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + pick_write=True, ), ) else: raise ValueError("`axis` must be one of 'x' or 'y'") + # Render the mesh before the lines + mesh.render_order = -1 + # the fill of the selection self.fill = mesh # no x, y offsets for linear region selector @@ -188,7 +204,15 @@ def __init__( positions=init_line_data.copy() ), # copy so the line buffer is isolated pygfx.LineMaterial( - thickness=edge_thickness, color=self.edge_color, pick_write=True + thickness=edge_thickness, + color=self.edge_color, + alpha_mode="blend", + opacity=1, + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + pick_write=True, ), ) line1 = pygfx.Line( @@ -196,16 +220,20 @@ def __init__( positions=init_line_data.copy() ), # copy so the line buffer is isolated pygfx.LineMaterial( - thickness=edge_thickness, color=self.edge_color, pick_write=True + thickness=edge_thickness, + color=self.edge_color, + alpha_mode="blend", + opacity=1, + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + pick_write=True, ), ) self.edges: tuple[pygfx.Line, pygfx.Line] = (line0, line1) - - # add the edge lines - for edge in self.edges: - edge.world.z = -0.5 - group.add(edge) + group.add(*self.edges) # TODO: if parent offset changes, we should set the selector offset too, use offset evented property # TODO: add check if parent is `None`, will throw error otherwise @@ -369,7 +397,6 @@ def get_selected_indices( return np.arange(*bounds, dtype=int) def _move_graphic(self, move_info: MoveInfo): - # If this the first move in this drag, store initial selection if move_info.start_selection is None: move_info.start_selection = self.selection diff --git a/fastplotlib/graphics/selectors/_polygon.py b/fastplotlib/graphics/selectors/_polygon.py index 1bca2aca9..e02c627ac 100644 --- a/fastplotlib/graphics/selectors/_polygon.py +++ b/fastplotlib/graphics/selectors/_polygon.py @@ -7,6 +7,7 @@ import numpy as np import pygfx +from ...utils.enums import RenderQueue from .._base import Graphic from .._collection_base import GraphicCollection from ..features._selection_features import PolygonSelectionFeature @@ -77,7 +78,7 @@ def __init__( limits: Sequence[float], parent: Graphic = None, resizable: bool = True, - fill_color=(0, 0, 0.35, 0.2), + fill_color=(0, 0, 0.35), edge_color=(0.8, 0.6, 0), edge_thickness: float = 4, vertex_color=(0.7, 0.4, 0), @@ -104,27 +105,62 @@ def __init__( self._line = pygfx.Line( self.geometry, pygfx.LineMaterial( - thickness=edge_thickness, color=edge_color, pick_write=True + thickness=edge_thickness, + color=edge_color, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + pick_write=True, ), ) self._points = pygfx.Points( self.geometry, - pygfx.PointsMaterial(size=vertex_size, color=vertex_color, pick_write=True), + pygfx.PointsMaterial( + size=vertex_size, + color=vertex_color, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + pick_write=True, + ), ) self._indicator = pygfx.Points( pygfx.Geometry(positions=[[0, 0, 0]]), - pygfx.PointsMaterial(size=15, color=vertex_color, opacity=0.3), + pygfx.PointsMaterial( + size=15, + color=vertex_color, + alpha_mode="blend", + opacity=0.3, + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + ), ) self._indicator.visible = False self._mesh = pygfx.Mesh( - self.geometry, pygfx.MeshBasicMaterial(color=fill_color, pick_write=True) + self.geometry, + pygfx.MeshBasicMaterial( + color=fill_color, + alpha_mode="blend", + opacity=0.4, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + pick_write=True, + ), ) group = pygfx.Group().add(self._line, self._points, self._mesh, self._indicator) self._set_world_object(group) - # Order in z, so stuff stays pickable - self._line.local.z = 0.1 - self._points.local.z = 0.2 + # Points go on top of lines, which go on top of the mesh. And indicator in between. + self._line.render_order = 1 + self._indicator.render_order = 2 + self._points.render_order = 3 if selection is None: selection = [] @@ -225,9 +261,8 @@ def get_selected_data( # empty selection return np.array([], dtype=np.float32).reshape(0, 3) - s = slice( - ixs[0], ixs[-1] + 1 - ) # add 1 to end because these are direct indices + # add 1 to end because these are direct indices + s = slice(ixs[0], ixs[-1] + 1) # slices n_datapoints dim # slice with min, max is faster than using all the indices @@ -419,7 +454,7 @@ def _on_pointer_move(self, ev): """After mouse pointer move event, moves endpoint of current line segment""" if self._move_info.mode is None: return - world_pos = self._plot_area.map_screen_to_world(ev) + world_pos = self._plot_area.map_screen_to_world((ev.x, ev.y)) if world_pos is None: return @@ -430,9 +465,24 @@ def _on_pointer_move(self, ev): # - allowing the user to merge points by dragging one onto its neighbour. index = self._move_info.index snap_index = None - if ev.target is self._points: - snap_index = ev.pick_info["vertex_index"] - if snap_index == index: # dont snap to moving point + + # Use numpy to select the nearest point. + # This is because we cannot use picking on the actual points because + # then we'd always pick the point being moved. We don't use a depth buffer + # so we cannot move the point backwards to avoid it being picked. + # An advantage is that we can make the snap-radius larger than the size of the points. + world_pos2 = self._plot_area.map_screen_to_world((ev.x + 1, ev.y)) + world_pos_scale = float(np.linalg.norm(world_pos - world_pos2)) + snap_radius = 20 # logical screen pixels + if len(self.selection) > 0: + distances = np.linalg.norm(self.selection[:, :2] - world_pos[:2], axis=1) + distances /= world_pos_scale + distances[index] = np.inf + snap_index = int(np.argmin(distances)) + if distances[snap_index] > snap_radius: + snap_index = None + + if snap_index == index: # just in case, dont snap to moving point snap_index = None if len(self.selection) < 4: snap_index = None @@ -455,9 +505,6 @@ def _on_pointer_move(self, ev): else: self._indicator.material.size = 15 - # Move the positions being moved a bit down in depth, so its de-preferred in picking - world_pos = (world_pos[0], world_pos[1], -0.05) - self._indicator.local.position = world_pos # Update data @@ -473,10 +520,6 @@ def _on_pointer_move(self, ev): def _on_pointer_up(self, ev): if self._move_info.mode in ("create", "drag"): - # Update data to set depth (z) to zero again - data = self.selection - data[:, 2] = 0 - self._selection.set_value(self, data) # If we snapped, we dissolve (i.e. delete the vertex being moved) if self._move_info.snap_index is not None: assert self._move_info.index is not None diff --git a/fastplotlib/graphics/selectors/_rectangle.py b/fastplotlib/graphics/selectors/_rectangle.py index fc62faf5c..e30165dae 100644 --- a/fastplotlib/graphics/selectors/_rectangle.py +++ b/fastplotlib/graphics/selectors/_rectangle.py @@ -6,6 +6,7 @@ import pygfx from .._collection_base import GraphicCollection +from ...utils.enums import RenderQueue from .._base import Graphic from ..features import RectangleSelectionFeature from ._base_selector import BaseSelector, MoveInfo @@ -135,7 +136,13 @@ def __init__( self.fill = pygfx.Mesh( pygfx.box_geometry(width, height, 1), pygfx.MeshBasicMaterial( - color=pygfx.Color(self.fill_color), pick_write=True + color=pygfx.Color(self.fill_color), + alpha_mode="blend", + opacity=0.4, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + pick_write=True, ), ) @@ -153,7 +160,15 @@ def __init__( left_line = pygfx.Line( pygfx.Geometry(positions=left_line_data.copy()), - pygfx.LineMaterial(thickness=edge_thickness, color=self.edge_color), + pygfx.LineMaterial( + thickness=edge_thickness, + color=self.edge_color, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + ), ) # position data for the right edge line @@ -166,7 +181,15 @@ def __init__( right_line = pygfx.Line( pygfx.Geometry(positions=right_line_data.copy()), - pygfx.LineMaterial(thickness=edge_thickness, color=self.edge_color), + pygfx.LineMaterial( + thickness=edge_thickness, + color=self.edge_color, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + ), ) # position data for the left edge line @@ -179,7 +202,15 @@ def __init__( bottom_line = pygfx.Line( pygfx.Geometry(positions=bottom_line_data.copy()), - pygfx.LineMaterial(thickness=edge_thickness, color=self.edge_color), + pygfx.LineMaterial( + thickness=edge_thickness, + color=self.edge_color, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + ), ) # position data for the right edge line @@ -192,7 +223,15 @@ def __init__( top_line = pygfx.Line( pygfx.Geometry(positions=top_line_data.copy()), - pygfx.LineMaterial(thickness=edge_thickness, color=self.edge_color), + pygfx.LineMaterial( + thickness=edge_thickness, + color=self.edge_color, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, + ), ) self.edges: Tuple[pygfx.Line, pygfx.Line, pygfx.Line, pygfx.Line] = ( @@ -203,9 +242,10 @@ def __init__( ) # left line, right line, bottom line, top line # add the edge lines + for edge in self.edges: - edge.world.z = -0.5 - group.add(edge) + edge.render_order = 1 + group.add(*self.edges) # vertices top_left_vertex_data = (xmin, ymax, 1) @@ -221,6 +261,11 @@ def __init__( color=self.vertex_color, size_mode="vertex", edge_color=self.vertex_color, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, ), ) @@ -232,6 +277,11 @@ def __init__( color=self.vertex_color, size_mode="vertex", edge_color=self.vertex_color, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, ), ) @@ -243,6 +293,11 @@ def __init__( color=self.vertex_color, size_mode="vertex", edge_color=self.vertex_color, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, ), ) @@ -254,6 +309,11 @@ def __init__( color=self.vertex_color, size_mode="vertex", edge_color=self.vertex_color, + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.selector, + depth_test=False, + depth_write=False, ), ) @@ -265,7 +325,7 @@ def __init__( ) for vertex in self.vertices: - vertex.world.z = -0.25 + vertex.render_order = 2 group.add(vertex) self._selection = RectangleSelectionFeature(selection, limits=self._limits) diff --git a/fastplotlib/graphics/text.py b/fastplotlib/graphics/text.py index fd0e9d702..9f1aeb8af 100644 --- a/fastplotlib/graphics/text.py +++ b/fastplotlib/graphics/text.py @@ -1,6 +1,7 @@ import pygfx import numpy as np +from ..utils.enums import RenderQueue from ._base import Graphic from .features import ( TextData, @@ -78,12 +79,21 @@ def __init__( self._outline_color = TextOutlineColor(outline_color) self._outline_thickness = TextOutlineThickness(outline_thickness) + # Text is usually used for annotations and the like. But we still want it to write depth. + # We make it render later than other 'auto' objects, assuming that most of these don't have transparent fragments. + + # The aa is on because it makes the glyphs prettier. It can result in artifacts, but these often express a different color outline + # which is actually not so bad; it would look weird on a line, but for text it helps the contrast of the glyph! + world_object = pygfx.Text( text=self.text, font_size=self.font_size, screen_space=screen_space, anchor=anchor, material=pygfx.TextMaterial( + alpha_mode="auto", + render_queue=RenderQueue.auto + 50, + aa=True, color=self.face_color, outline_color=self.outline_color, outline_thickness=self.outline_thickness, diff --git a/fastplotlib/layouts/_frame.py b/fastplotlib/layouts/_frame.py index cd2a1cbc2..1c308590f 100644 --- a/fastplotlib/layouts/_frame.py +++ b/fastplotlib/layouts/_frame.py @@ -1,6 +1,7 @@ import numpy as np import pygfx +from ..utils.enums import RenderQueue from ._rect import RectManager from ._utils import IMGUI_TOOLBAR_HEIGHT from ..utils.types import SelectorColorStates @@ -37,7 +38,7 @@ # wgsl shader snippet for SDF function that defines the resize handler, a lower right triangle. sdf_wgsl_resize_handle = """ -// hardcode square root of 2 +// hardcode square root of 2 let m_sqrt_2 = 1.4142135; // given a distance from an origin point, this defines the hypotenuse of a lower right triangle @@ -171,16 +172,28 @@ def __init__( else: title_text = title self._title_graphic = TextGraphic(title_text, font_size=16, face_color="white") + m = self._title_graphic.world_object.material + m.alpha_mode = "blend" + m.render_queue = RenderQueue.background + m.depth_write = False + m.depth_test = False wobjects.append(self._title_graphic.world_object) # init mesh of size 1 to graphically represent rect geometry = pygfx.plane_geometry(1, 1) - material = pygfx.MeshBasicMaterial(color=self.plane_color.idle, pick_write=True) + material = pygfx.MeshBasicMaterial( + alpha_mode="blend", + render_queue=RenderQueue.background, + color=self.plane_color.idle, + depth_write=False, + depth_test=False, + pick_write=True, + ) self._plane = pygfx.Mesh(geometry, material) wobjects.append(self._plane) - # otherwise text isn't visible - self._plane.world.z = 0.5 + # Plane gets rendered before text and point + self._plane.render_order = -1 # create resize handler at point (x1, y1) x1, y1 = self.extent[[1, 3]] @@ -189,21 +202,21 @@ def __init__( # subtract 7 so that the bottom right corner of the triangle is at the center pygfx.Geometry(positions=[[x1 - 7, -y1 + 7, 0]]), pygfx.PointsMarkerMaterial( + alpha_mode="blend", + render_queue=RenderQueue.background, color=self.resize_handle_color.idle, marker="custom", custom_sdf=sdf_wgsl_resize_handle, size=12, size_space="screen", + depth_write=False, + depth_test=False, pick_write=True, ), ) if not resizeable: - # set all color states to transparent if Frame isn't resizeable - c = (0, 0, 0, 0) - self._resize_handle.material.color = c - self._resize_handle.material.edge_width = 0 - self.resize_handle_color = SelectorColorStates(c, c, c) + self._resize_handle.visible = False wobjects.append(self._resize_handle) diff --git a/fastplotlib/layouts/_graphic_methods_mixin.py b/fastplotlib/layouts/_graphic_methods_mixin.py index cb9cd04c0..1a041547b 100644 --- a/fastplotlib/layouts/_graphic_methods_mixin.py +++ b/fastplotlib/layouts/_graphic_methods_mixin.py @@ -89,7 +89,6 @@ def add_line_collection( thickness: Union[float, Sequence[float]] = 2.0, colors: Union[str, Sequence[str], numpy.ndarray, Sequence[numpy.ndarray]] = "w", uniform_colors: bool = False, - alpha: float = 1.0, cmap: Union[Sequence[str], str] = None, cmap_transform: Union[numpy.ndarray, List] = None, name: str = None, @@ -122,9 +121,6 @@ def add_line_collection( | if ``list`` of ``str``, represents color for each individual line, example ["w", "b", "r",...] | if ``RGBA array`` of shape [data_size, 4], represents a single RGBA array for each line - alpha: float, optional - alpha value for colors, if colors is a ``str`` - cmap: Iterable of str or str, optional | if ``str``, single cmap will be used for all lines | if ``list`` of ``str``, each cmap will apply to the individual lines @@ -162,7 +158,6 @@ def add_line_collection( thickness, colors, uniform_colors, - alpha, cmap, cmap_transform, name, @@ -180,7 +175,6 @@ def add_line( thickness: float = 2.0, colors: Union[str, numpy.ndarray, Sequence] = "w", uniform_color: bool = False, - alpha: float = 1.0, cmap: str = None, cmap_transform: Union[numpy.ndarray, Sequence] = None, isolated_buffer: bool = True, @@ -210,9 +204,6 @@ def add_line( if True, uses a uniform buffer for the line color, basically saves GPU VRAM when the entire line has a single color - alpha: float, optional, default 1.0 - alpha value for the colors - cmap: str, optional Apply a colormap to the line instead of assigning colors manually, this overrides any argument passed to "colors". For supported colormaps see the @@ -235,7 +226,6 @@ def add_line( thickness, colors, uniform_color, - alpha, cmap, cmap_transform, isolated_buffer, @@ -248,7 +238,6 @@ def add_line_stack( data: List[numpy.ndarray], thickness: Union[float, Iterable[float]] = 2.0, colors: Union[str, Iterable[str], numpy.ndarray, Iterable[numpy.ndarray]] = "w", - alpha: float = 1.0, cmap: Union[Iterable[str], str] = None, cmap_transform: Union[numpy.ndarray, List] = None, name: str = None, @@ -283,9 +272,6 @@ def add_line_stack( | if ``list`` of ``str``, represents color for each individual line, example ["w", "b", "r",...] | if ``RGBA array`` of shape [data_size, 4], represents a single RGBA array for each line - alpha: float, optional - alpha value for colors, if colors is a ``str`` - cmap: Iterable of str or str, optional | if ``str``, single cmap will be used for all lines | if ``list`` of ``str``, each cmap will apply to the individual lines @@ -329,7 +315,6 @@ def add_line_stack( data, thickness, colors, - alpha, cmap, cmap_transform, name, @@ -348,7 +333,6 @@ def add_scatter( data: Any, colors: str | numpy.ndarray | tuple[float] | list[float] | list[str] = "w", uniform_color: bool = False, - alpha: float = 1.0, cmap: str = None, cmap_transform: numpy.ndarray = None, isolated_buffer: bool = True, @@ -375,9 +359,6 @@ def add_scatter( if True, uses a uniform buffer for the scatter point colors. Useful if you need to save GPU VRAM when all points have the same color. - alpha: float, optional, default 1.0 - alpha value for the colors - cmap: str, optional apply a colormap to the scatter instead of assigning colors manually, this overrides any argument passed to "colors". For supported colormaps see the @@ -410,7 +391,6 @@ def add_scatter( data, colors, uniform_color, - alpha, cmap, cmap_transform, isolated_buffer, diff --git a/fastplotlib/layouts/_imgui_figure.py b/fastplotlib/layouts/_imgui_figure.py index c54890239..046c622ea 100644 --- a/fastplotlib/layouts/_imgui_figure.py +++ b/fastplotlib/layouts/_imgui_figure.py @@ -66,7 +66,15 @@ def __init__( self._imgui_renderer = ImguiRenderer(self.renderer.device, self.canvas) - fronts_path = str( + # This loads both the Roboto Font and FontAwesome 6 icons and creates and merged font + # allowing us to use both without pushing and popping to display icons or regular text + sans_serif_font = str( + Path(imgui_bundle.__file__).parent.joinpath( + "assets", "fonts", "Roboto", "Roboto-Regular.ttf" + ) + ) + + fa_6_fonts_path = str( Path(imgui_bundle.__file__).parent.joinpath( "assets", "fonts", "Font_Awesome_6_Free-Solid-900.otf" ) @@ -74,12 +82,20 @@ def __init__( io = imgui.get_io() - self._fa_icons = io.fonts.add_font_from_file_ttf( - fronts_path, 16, glyph_ranges_as_int_list=[fa.ICON_MIN_FA, fa.ICON_MAX_FA] + self._default_imgui_font = io.fonts.add_font_from_file_ttf( + sans_serif_font, 14, imgui.ImFontConfig() + ) + + font_config = imgui.ImFontConfig() + font_config.merge_mode = True + + self._default_imgui_font = io.fonts.add_font_from_file_ttf( + fa_6_fonts_path, + 14, + font_config, ) - io.fonts.build() - self.imgui_renderer.backend.create_fonts_texture() + imgui.push_font(self._default_imgui_font, self._default_imgui_font.legacy_size) self.imgui_renderer.set_gui(self._draw_imgui) @@ -88,12 +104,10 @@ def __init__( ) for i, subplot in enumerate(self._subplots.ravel()): - toolbar = SubplotToolbar(subplot=subplot, fa_icons=self._fa_icons) + toolbar = SubplotToolbar(subplot=subplot) self._subplot_toolbars[i] = toolbar - self._right_click_menu = StandardRightClickMenu( - figure=self, fa_icons=self._fa_icons - ) + self._right_click_menu = StandardRightClickMenu(figure=self) self._popups: dict[str, Popup] = {} @@ -102,6 +116,10 @@ def __init__( self.register_popup(ColormapPicker) + @property + def default_imgui_font(self) -> imgui.ImFont: + return self._default_imgui_font + @property def guis(self) -> dict[str, EdgeWindow]: """GUI windows added to the Figure""" @@ -125,7 +143,7 @@ def _render(self, draw=False): self.canvas.request_draw() def _draw_imgui(self) -> imgui.ImDrawData: - imgui.new_frame() + # imgui.new_frame() for subplot, toolbar in zip( self._subplots.ravel(), self._subplot_toolbars.ravel() @@ -144,11 +162,11 @@ def _draw_imgui(self) -> imgui.ImDrawData: self._right_click_menu.update() - imgui.end_frame() + # imgui.end_frame() - imgui.render() + # imgui.render() - return imgui.get_draw_data() + # return imgui.get_draw_data() def add_gui(self, gui: EdgeWindow): """ diff --git a/fastplotlib/layouts/_plot_area.py b/fastplotlib/layouts/_plot_area.py index 2542fc215..feda52930 100644 --- a/fastplotlib/layouts/_plot_area.py +++ b/fastplotlib/layouts/_plot_area.py @@ -111,6 +111,7 @@ def __init__( (0.0, 0.0, 0.0, 1.0), (0.0, 0.0, 0.0, 1.0), (0.0, 0.0, 0.0, 1.0), + alpha_mode="blend", ) self._background = pygfx.Background(None, self._background_material) self.scene.add(self._background) diff --git a/fastplotlib/layouts/_utils.py b/fastplotlib/layouts/_utils.py index 98a6268f1..49120c71a 100644 --- a/fastplotlib/layouts/_utils.py +++ b/fastplotlib/layouts/_utils.py @@ -17,7 +17,7 @@ # number of pixels taken by the imgui toolbar when present -IMGUI_TOOLBAR_HEIGHT = 39 +IMGUI_TOOLBAR_HEIGHT = 36 def make_canvas_and_renderer( diff --git a/fastplotlib/legends/legend.py b/fastplotlib/legends/legend.py index 69a556109..b24bcac58 100644 --- a/fastplotlib/legends/legend.py +++ b/fastplotlib/legends/legend.py @@ -5,6 +5,7 @@ import numpy as np import pygfx +from ..utils.enums import RenderQueue from ..graphics import Graphic from ..graphics.features import GraphicFeatureEvent from ..graphics import LineGraphic, ScatterGraphic, ImageGraphic @@ -74,22 +75,32 @@ def __init__( self._line_world_object = pygfx.Line( geometry=pygfx.Geometry(positions=data), - material=material(thickness=8, color=self._color), + material=material( + alpha_mode="blend", + render_queue=RenderQueue.overlay, + thickness=8, + color=self._color, + depth_write=False, + depth_test=False, + ), ) # self._line_world_object.world.x = position[0] self._label_world_object = pygfx.Text( - geometry=pygfx.TextGeometry( - text=str(label), - font_size=6, - screen_space=False, - anchor="middle-left", - ), + text=str(label), + font_size=6, + screen_space=False, + anchor="middle-left", material=pygfx.TextMaterial( + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.overlay, color="w", outline_color="w", outline_thickness=0, + depth_write=False, + depth_test=False, ), ) @@ -175,10 +186,18 @@ def __init__( self._mesh = pygfx.Mesh( pygfx.box_geometry(50, 10, 1), pygfx.MeshBasicMaterial( - color=pygfx.Color([0.1, 0.1, 0.1, 1]), wireframe_thickness=10 + alpha_mode="blend", + render_queue=RenderQueue.overlay, + color=pygfx.Color([0.1, 0.1, 0.1, 1]), + wireframe_thickness=10, + depth_write=False, + depth_test=False, ), ) + # Plane gets rendered before text and line + self._mesh.render_order = -1 + self.world_object.add(self._mesh) self.world_object.add(self._legend_items_group) diff --git a/fastplotlib/tools/_tooltip.py b/fastplotlib/tools/_tooltip.py index 2fbdfcec2..f6c9cf531 100644 --- a/fastplotlib/tools/_tooltip.py +++ b/fastplotlib/tools/_tooltip.py @@ -3,6 +3,7 @@ import numpy as np import pygfx +from ..utils.enums import RenderQueue from ..graphics import LineGraphic, ImageGraphic, ScatterGraphic, Graphic from ..graphics.features import GraphicFeatureEvent @@ -59,19 +60,28 @@ def __init__(self): screen_space=False, anchor="bottom-left", material=pygfx.TextMaterial( + alpha_mode="blend", + aa=True, + render_queue=RenderQueue.overlay, color="w", outline_color="w", outline_thickness=0.0, + depth_write=False, + depth_test=False, pick_write=False, ), ) # plane for the background of the text object geometry = pygfx.plane_geometry(1, 1) - material = pygfx.MeshBasicMaterial(color=(0.1, 0.1, 0.3, 0.95)) + material = pygfx.MeshBasicMaterial( + alpha_mode="blend", + render_queue=RenderQueue.overlay, + color=(0.1, 0.1, 0.3, 0.95), + depth_write=False, + depth_test=False, + ) self._plane = pygfx.Mesh(geometry, material) - # else text not visible - self._plane.world.z = 0.5 # line to outline the plane mesh self._line = pygfx.Line( @@ -87,8 +97,17 @@ def __init__(self): dtype=np.float32, ) ), - material=pygfx.LineThinMaterial(thickness=1.0, color=(0.8, 0.8, 1.0, 1.0)), + material=pygfx.LineThinMaterial( + alpha_mode="blend", + render_queue=RenderQueue.overlay, + thickness=1.0, + color=(0.8, 0.8, 1.0, 1.0), + depth_write=False, + depth_test=False, + ), ) + # Plane gets rendered before text and line + self._plane.render_order = -1 self._world_object = pygfx.Group() self._world_object.add(self._plane, self._text, self._line) diff --git a/fastplotlib/ui/_base.py b/fastplotlib/ui/_base.py index e31dd8d4a..3e763e08c 100644 --- a/fastplotlib/ui/_base.py +++ b/fastplotlib/ui/_base.py @@ -1,3 +1,4 @@ +import enum from typing import Literal import numpy as np @@ -42,7 +43,7 @@ def __init__( size: int, location: Literal["bottom", "right"], title: str, - window_flags: int = imgui.WindowFlags_.no_collapse + window_flags: enum.IntFlag = imgui.WindowFlags_.no_collapse | imgui.WindowFlags_.no_resize, *args, **kwargs, @@ -64,8 +65,8 @@ def __init__( title: str window title - window_flags: int - window flag enum, valid flags are: + window_flags: enum.IntFlag + Window flag enum, can be compared with ``|`` operator. Valid flags are: .. code-block:: py @@ -109,7 +110,6 @@ def __init__( self._location = location self._title = title self._window_flags = window_flags - self._fa_icons = self._figure._fa_icons self._x, self._y, self._width, self._height = self.get_rect() @@ -231,7 +231,6 @@ def __init__(self, figure: Figure, *args, **kwargs): super().__init__() self._figure = figure - self._fa_icons = self._figure._fa_icons self.is_open = False diff --git a/fastplotlib/ui/_subplot_toolbar.py b/fastplotlib/ui/_subplot_toolbar.py index a06e81b90..435de4206 100644 --- a/fastplotlib/ui/_subplot_toolbar.py +++ b/fastplotlib/ui/_subplot_toolbar.py @@ -6,14 +6,13 @@ class SubplotToolbar(Window): - def __init__(self, subplot: Subplot, fa_icons: imgui.ImFont): + def __init__(self, subplot: Subplot): """ Subplot toolbar shown below all subplots """ super().__init__() self._subplot = subplot - self._fa_icons = fa_icons def update(self): # get subplot rect @@ -32,42 +31,32 @@ def update(self): imgui.begin(f"Toolbar-{hex(id(self._subplot))}", p_open=None, flags=flags) - # icons for buttons - imgui.push_font(self._fa_icons) - # push ID to prevent conflict between multiple figs with same UI imgui.push_id(self._id_counter) with imgui_ctx.begin_horizontal(f"toolbar-{hex(id(self._subplot))}"): # autoscale button if imgui.button(fa.ICON_FA_MAXIMIZE): self._subplot.auto_scale() - imgui.pop_font() if imgui.is_item_hovered(0): imgui.set_tooltip("autoscale scene") # center scene - imgui.push_font(self._fa_icons) if imgui.button(fa.ICON_FA_ALIGN_CENTER): self._subplot.center_scene() - imgui.pop_font() if imgui.is_item_hovered(0): imgui.set_tooltip("center scene") - imgui.push_font(self._fa_icons) # checkbox controller _, self._subplot.controller.enabled = imgui.checkbox( fa.ICON_FA_COMPUTER_MOUSE, self._subplot.controller.enabled ) - imgui.pop_font() if imgui.is_item_hovered(0): imgui.set_tooltip("enable/disable controller") - imgui.push_font(self._fa_icons) - # checkbox maintain_apsect + # checkbox maintain_aspect _, self._subplot.camera.maintain_aspect = imgui.checkbox( fa.ICON_FA_EXPAND, self._subplot.camera.maintain_aspect ) - imgui.pop_font() if imgui.is_item_hovered(0): imgui.set_tooltip("maintain aspect") diff --git a/fastplotlib/ui/right_click_menus/_colormap_picker.py b/fastplotlib/ui/right_click_menus/_colormap_picker.py index 3c48bd4d8..199a8ff6d 100644 --- a/fastplotlib/ui/right_click_menus/_colormap_picker.py +++ b/fastplotlib/ui/right_click_menus/_colormap_picker.py @@ -26,14 +26,13 @@ class ColormapPicker(Popup): name = "colormap-picker" def __init__(self, figure): - super().__init__(figure=figure, fa_icons=None) + super().__init__(figure=figure) self.renderer = self._figure.renderer self.imgui_renderer = self._figure.imgui_renderer # maps str cmap names -> int texture IDs - self._texture_ids: dict[str, int] = {} - self._textures = list() + self._cmap_texture_refs: dict[str, imgui.ImTextureRef] = dict() # make all colormaps and upload representative texture for each cmap to the GPU for name in all_cmaps: @@ -45,8 +44,7 @@ def __init__(self, figure): data = np.vstack([[data]] * 2).astype(np.uint8) # upload the texture to the GPU, get the texture ID and texture - self._texture_ids[name], texture = self._create_texture_and_upload(data) - self._textures.append(texture) + self._cmap_texture_refs[name] = self._create_texture_and_upload(data) # used to set the states of the UI self._lut_tool = None @@ -83,12 +81,8 @@ def _create_texture_and_upload(self, data: np.ndarray) -> tuple[int, GPUTexture] # get a view texture_view = texture.create_view() - # get the id so that imgui can display it - id_texture = ctypes.c_int32(id(texture_view)).value - # add texture view to the backend so that it can be retrieved for rendering - self.imgui_renderer.backend._texture_views[id_texture] = texture_view - - return id_texture, texture + # return texture ref + return self.imgui_renderer.backend.register_texture(texture_view) def open(self, pos: tuple[int, int], lut_tool): """ @@ -121,10 +115,19 @@ def close(self): self.is_open = False def _add_cmap_menu_item(self, cmap_name: str): - texture_id = self._texture_ids[cmap_name] + # white border around cmap image + imgui.push_style_color(imgui.Col_.border, (1.0, 1.0, 1.0, 1.0)) + imgui.push_style_var(imgui.StyleVar_.image_border_size, 1.0) + + # cmap image + texture_ref = self._cmap_texture_refs[cmap_name] imgui.image( - texture_id, image_size=(50, self._texture_height), border_col=(1, 1, 1, 1) + texture_ref, + image_size=(50, self._texture_height), ) + # pop white border + imgui.pop_style_var() + imgui.pop_style_color() imgui.same_line() @@ -148,10 +151,7 @@ def update(self): self.is_open = True # make the cmap image height the same as the text height - self._texture_height = ( - self.imgui_renderer.backend.io.font_global_scale - * imgui.get_font().font_size - ) - 2 + self._texture_height = (imgui.get_font_size()) - 2 if imgui.menu_item("Reset vmin-vmax", "", False)[0]: self._lut_tool.image_graphic.reset_vmin_vmax() diff --git a/fastplotlib/ui/right_click_menus/_standard_menu.py b/fastplotlib/ui/right_click_menus/_standard_menu.py index 4bb59c51d..bb9e5bdef 100644 --- a/fastplotlib/ui/right_click_menus/_standard_menu.py +++ b/fastplotlib/ui/right_click_menus/_standard_menu.py @@ -22,8 +22,8 @@ def flip_axis(subplot: PlotArea, axis: str, flip: bool): class StandardRightClickMenu(Popup): """Right click menu that is shown on subplots""" - def __init__(self, figure, fa_icons): - super().__init__(figure=figure, fa_icons=fa_icons) + def __init__(self, figure): + super().__init__(figure=figure) self._last_right_click_pos = None self._mouse_down: bool = False @@ -182,19 +182,4 @@ def update(self): imgui.end_menu() - # renderer blend modes - if imgui.begin_menu("Blend mode"): - for blend_mode in sorted( - self.get_subplot().renderer._blenders_available.keys() - ): - clicked, _ = imgui.menu_item( - label=blend_mode, - shortcut="", - p_selected=self.get_subplot().renderer.blend_mode == blend_mode, - ) - - if clicked: - self.get_subplot().renderer.blend_mode = blend_mode - imgui.end_menu() - imgui.end_popup() diff --git a/fastplotlib/utils/__init__.py b/fastplotlib/utils/__init__.py index dce4d96f9..dd527ca67 100644 --- a/fastplotlib/utils/__init__.py +++ b/fastplotlib/utils/__init__.py @@ -5,6 +5,7 @@ from .functions import * from .gpu import enumerate_adapters, select_adapter, print_wgpu_report from ._plot_helpers import * +from .enums import * @dataclass diff --git a/fastplotlib/utils/enums.py b/fastplotlib/utils/enums.py new file mode 100644 index 000000000..5de3b2e0a --- /dev/null +++ b/fastplotlib/utils/enums.py @@ -0,0 +1,14 @@ +from enum import IntEnum + + +class RenderQueue(IntEnum): + # Defaults by PyGfx + background = 1000 + opaque = 2000 + opaque_with_discard = 2400 + auto = 2600 + transparent = 3000 + overlay = 4000 + # For selectors we use a render_queue of 3500, which is at the end of what is considered the group of transparent objects. + # So it's rendered later than the normal scene (2000 - 3000), but before overlays like legends and tooltips. + selector = 3500 diff --git a/fastplotlib/widgets/image_widget/_sliders.py b/fastplotlib/widgets/image_widget/_sliders.py index c8ad67f39..393b13273 100644 --- a/fastplotlib/widgets/image_widget/_sliders.py +++ b/fastplotlib/widgets/image_widget/_sliders.py @@ -56,19 +56,15 @@ def update(self): flag_index_changed = False # reset vmin-vmax using full orig data - imgui.push_font(self._fa_icons) if imgui.button(label=fa.ICON_FA_CIRCLE_HALF_STROKE + fa.ICON_FA_FILM): self._image_widget.reset_vmin_vmax() - imgui.pop_font() if imgui.is_item_hovered(0): imgui.set_tooltip("reset contrast limits using full movie/stack") # reset vmin-vmax using currently displayed ImageGraphic data - imgui.push_font(self._fa_icons) imgui.same_line() if imgui.button(label=fa.ICON_FA_CIRCLE_HALF_STROKE): self._image_widget.reset_vmin_vmax_frame() - imgui.pop_font() if imgui.is_item_hovered(0): imgui.set_tooltip("reset contrast limits using current frame") @@ -78,7 +74,6 @@ def update(self): # buttons and slider UI elements for each dim for dim in self._image_widget.slider_dims: imgui.push_id(f"{self._id_counter}_{dim}") - imgui.push_font(self._fa_icons) if self._playing[dim]: # show pause button if playing @@ -119,7 +114,6 @@ def update(self): imgui.same_line() # loop checkbox _, self._loop = imgui.checkbox(label=fa.ICON_FA_ROTATE, v=self._loop) - imgui.pop_font() if imgui.is_item_hovered(0): imgui.set_tooltip("loop playback") diff --git a/pyproject.toml b/pyproject.toml index cda3b65b1..debca6d6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,8 +20,8 @@ keywords = [ requires-python = ">= 3.10" dependencies = [ "numpy>=1.23.0", - "pygfx==0.12.0", - "wgpu>=0.20.0", + "pygfx==0.13", + "wgpu", # Let pygfx constrain the wgpu version "cmap>=0.1.3", # (this comment keeps this list multiline in VSCode) ] @@ -55,7 +55,7 @@ tests = [ "scikit-learn", "tqdm", ] -imgui = ["imgui-bundle>=1.6.0,<1.92.0"] +imgui = ["wgpu[imgui]"] dev = ["fastplotlib[docs,notebook,tests,imgui]"] [project.urls] diff --git a/tests/test_positions_graphics.py b/tests/test_positions_graphics.py index ed791b6fa..40d3561aa 100644 --- a/tests/test_positions_graphics.py +++ b/tests/test_positions_graphics.py @@ -73,12 +73,11 @@ def test_sizes_slice(): @pytest.mark.parametrize("graphic_type", ["line", "scatter"]) @pytest.mark.parametrize("colors", [None, *generate_color_inputs("b")]) @pytest.mark.parametrize("uniform_color", [True, False]) -@pytest.mark.parametrize("alpha", [1.0, 0.5, 0.0]) -def test_uniform_color(graphic_type, colors, uniform_color, alpha): +def test_uniform_color(graphic_type, colors, uniform_color): fig = fpl.Figure() kwargs = dict() - for kwarg in ["colors", "uniform_color", "alpha"]: + for kwarg in ["colors", "uniform_color"]: if locals()[kwarg] is not None: # add to dict of arguments that will be passed kwargs[kwarg] = locals()[kwarg] @@ -95,10 +94,10 @@ def test_uniform_color(graphic_type, colors, uniform_color, alpha): assert isinstance(graphic.colors, pygfx.Color) if colors is None: # default white - assert graphic.colors == pygfx.Color([1, 1, 1, alpha]) + assert graphic.colors == pygfx.Color([1, 1, 1]) else: # should be blue - assert graphic.colors == pygfx.Color([0, 0, 1, alpha]) + assert graphic.colors == pygfx.Color([0, 0, 1]) # check pygfx material npt.assert_almost_equal( @@ -111,13 +110,13 @@ def test_uniform_color(graphic_type, colors, uniform_color, alpha): # default white npt.assert_almost_equal( graphic.colors.value, - np.repeat([[1, 1, 1, alpha]], repeats=len(graphic.data), axis=0), + np.repeat([[1, 1, 1, 1.0]], repeats=len(graphic.data), axis=0), ) else: # blue npt.assert_almost_equal( graphic.colors.value, - np.repeat([[0, 0, 1, alpha]], repeats=len(graphic.data), axis=0), + np.repeat([[0, 0, 1, 1.0]], repeats=len(graphic.data), axis=0), ) # check geometry @@ -167,18 +166,16 @@ def test_positions_graphics_data( @pytest.mark.parametrize("graphic_type", ["line", "scatter"]) @pytest.mark.parametrize("colors", [None, *generate_color_inputs("r")]) @pytest.mark.parametrize("uniform_color", [None, False]) -@pytest.mark.parametrize("alpha", [None, 0.5, 0.0]) def test_positions_graphic_vertex_colors( graphic_type, colors, uniform_color, - alpha, ): # test different ways of passing vertex colors fig = fpl.Figure() kwargs = dict() - for kwarg in ["colors", "uniform_color", "alpha"]: + for kwarg in ["colors", "uniform_color"]: if locals()[kwarg] is not None: # add to dict of arguments that will be passed kwargs[kwarg] = locals()[kwarg] @@ -190,9 +187,6 @@ def test_positions_graphic_vertex_colors( elif graphic_type == "scatter": graphic = fig[0, 0].add_scatter(data=data, **kwargs) - if alpha is None: # default arg - alpha = 1 - # color per vertex # uniform colors is default False, or set to False assert isinstance(graphic._colors, VertexColors) @@ -203,14 +197,14 @@ def test_positions_graphic_vertex_colors( # default npt.assert_almost_equal( graphic.colors.value, - np.repeat([[1, 1, 1, alpha]], repeats=len(graphic.data), axis=0), + np.repeat([[1, 1, 1, 1.0]], repeats=len(graphic.data), axis=0), ) else: if len(colors) != len(graphic.data): # should be single red, regardless of input variant (i.e. str, array, RGBA tuple, etc. npt.assert_almost_equal( graphic.colors.value, - np.repeat([[1, 0, 0, alpha]], repeats=len(graphic.data), axis=0), + np.repeat([[1, 0, 0, 1.0]], repeats=len(graphic.data), axis=0), ) else: # multi colors @@ -225,20 +219,18 @@ def test_positions_graphic_vertex_colors( @pytest.mark.parametrize( "cmap_transform", [None, [3, 5, 2, 1, 0, 6, 9, 7, 4, 8], np.arange(9, -1, -1)] ) -@pytest.mark.parametrize("alpha", [None, 0.5, 0.0]) def test_cmap( graphic_type, colors, uniform_color, cmap, cmap_transform, - alpha, ): # test different ways of passing cmap args fig = fpl.Figure() kwargs = dict() - for kwarg in ["cmap", "cmap_transform", "colors", "uniform_color", "alpha"]: + for kwarg in ["cmap", "cmap_transform", "colors", "uniform_color"]: if locals()[kwarg] is not None: # add to dict of arguments that will be passed kwargs[kwarg] = locals()[kwarg] @@ -250,11 +242,7 @@ def test_cmap( elif graphic_type == "scatter": graphic = fig[0, 0].add_scatter(data=data, **kwargs) - if alpha is None: - alpha = 1.0 - truth = TRUTH_CMAPS[cmap].copy() - truth[:, -1] = alpha # permute if transform is provided if cmap_transform is not None: @@ -275,7 +263,6 @@ def test_cmap( # test changing cmap but not transform graphic.cmap = "viridis" truth = TRUTH_CMAPS["viridis"].copy() - truth[:, -1] = alpha if cmap_transform is not None: truth = truth[cmap_transform] @@ -293,7 +280,7 @@ def test_cmap( cmap_transform_norm /= cmap_transform_norm.max() cmap_transform_norm *= 255 - truth = fpl.utils.get_cmap("viridis", alpha=alpha) + truth = fpl.utils.get_cmap("viridis", alpha=1) truth = np.vstack([truth[val] for val in cmap_transform_norm.astype(int)]) graphic.cmap.transform = cmap_transform @@ -485,3 +472,7 @@ def test_size_space(graphic_type, size_space): graphic.size_space = "world" assert graphic.size_space == "world" assert graphic.world_object.material.size_space == "world" + + +if __name__ == "__main__": + test_cmap("scatter", None, False, "jet", None) \ No newline at end of file