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 55f2fbb

Browse filesBrowse files
authored
simplify examples section of readme
1 parent def83e6 commit 55f2fbb
Copy full SHA for 55f2fbb

File tree

1 file changed

+17
-45
lines changed
Filter options

1 file changed

+17
-45
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+17-45Lines changed: 17 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -85,65 +85,37 @@ pip install -e ".[notebook,docs,tests]"
8585
>
8686
> `fastplotlib` and `pygfx` are fast evolving, you may require the latest `pygfx` and `fastplotlib` from github to use the examples in the master branch.
8787
88-
First clone or download the repo to try the examples
89-
90-
```bash
91-
git clone https://github.com/kushalkolar/fastplotlib.git
92-
```
88+
Note that `fastplotlib` code is basically identical between desktop and notebook usage. The differences are:
89+
- Running in `Qt` or `glfw` require a `fastplotlib.run()` call (which is really just a `wgpu` `run()` call)
90+
- Notebooks plots have ipywidget-based toolbars and widgets 😄
9391

9492
### Desktop examples using `glfw` or `Qt`
9593

96-
```bash
97-
# most dirs within examples contain example code
98-
cd examples/desktop
94+
Desktop examples are here:
9995

100-
# simplest example
101-
python image/image_simple.py
102-
```
103-
104-
### Notebook examples
96+
https://github.com/fastplotlib/fastplotlib/tree/master/examples/desktop
10597

106-
```bash
107-
cd examples/notebooks
108-
jupyter lab
98+
Some of the examples require imageio:
10999
```
110-
111-
**Start out with `simple.ipynb`.**
112-
113-
### Simple image plot
114-
```python
115-
import fastplotlib as fpl
116-
import numpy as np
117-
118-
plot = fpl.Plot()
119-
120-
data = np.random.rand(512, 512)
121-
plot.add_image(data=data)
122-
123-
plot.show()
100+
pip install imageio
124101
```
125-
![image](https://user-images.githubusercontent.com/9403332/209422734-4f983b42-e126-40a7-a681-3b8e22dbd797.png)
126102

127-
### Fast animations
128-
```python
129-
import fastplotlib as fpl
130-
import numpy as np
131-
132-
plot = fpl.Plot()
103+
### Notebook examples
133104

134-
data = np.random.rand(512, 512)
135-
image = plot.image(data=data)
105+
Notebook examples are here:
136106

137-
def update_data():
138-
new_data = np.random.rand(512, 512)
139-
image.data = new_data
107+
https://github.com/fastplotlib/fastplotlib/tree/master/examples/notebooks
140108

141-
plot.add_animations(update_data)
109+
**Start with `simple.ipynb`.**
142110

143-
plot.show()
111+
Some of the examples require imageio:
144112
```
113+
pip install imageio
114+
```
115+
116+
### Video
145117

146-
![out](https://user-images.githubusercontent.com/9403332/209422871-6b2153f3-81ca-4f62-9200-8206a81eaf0d.gif)
118+
You can watch our SciPy 2023 talk if you prefer watching demos: https://github.com/fastplotlib/fastplotlib#scipy-talk
147119

148120
## Graphics drivers
149121

0 commit comments

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