Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8d9f69f

Browse filesBrowse files
committed
add another gridplot test
1 parent c41dd7b commit 8d9f69f
Copy full SHA for 8d9f69f

File tree

Expand file treeCollapse file tree

1 file changed

+34
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+34
-0
lines changed
+34Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""
2+
GridPlot Simple
3+
============
4+
Example showing simple 2x2 GridPlot with Standard images from imageio.
5+
"""
6+
7+
# test_example = true
8+
9+
import fastplotlib as fpl
10+
import imageio.v3 as iio
11+
12+
13+
plot = fpl.GridPlot(shape=(2, 2), controllers="sync")
14+
# to force a specific framework such as glfw:
15+
# plot = fpl.GridPlot(canvas="glfw")
16+
17+
im = iio.imread("imageio:clock.png")
18+
im2 = iio.imread("imageio:astronaut.png")
19+
im3 = iio.imread("imageio:coffee.png")
20+
21+
plot[0, 0].add_image(data=im)
22+
plot[0, 1].add_image(data=im2)
23+
plot[1, 0].add_image(data=im3)
24+
25+
plot.show()
26+
27+
plot.canvas.set_logical_size(800, 800)
28+
29+
for subplot in plot:
30+
subplot.auto_scale()
31+
32+
if __name__ == "__main__":
33+
print(__doc__)
34+
fpl.run()

0 commit comments

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