https://github.com/favreau/ipytransferfunction
Transfer function widget for jupyter notebook
https://github.com/favreau/ipytransferfunction
Last synced: 3 months ago
JSON representation
Transfer function widget for jupyter notebook
- Host: GitHub
- URL: https://github.com/favreau/ipytransferfunction
- Owner: favreau
- License: lgpl-3.0
- Created: 2018-02-27T21:32:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-21T09:49:48.000Z (over 5 years ago)
- Last Synced: 2025-05-12T13:12:49.585Z (about 1 year ago)
- Language: Python
- Size: 31.3 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Transfer Function
Transfer function editor widget for Jupyter Notebook
## Installation
```sh
virtualenv env
. ./env/bin/activate
pip install -r requirements.txt
```
## Usage (in Jupyter notebook)
### Create widget
```python
from ipyTransferFunction import TransferFunctionEditor
def display_palette_info(transfer_function):
print(transfer_function.data_range)
tf = TransferFunctionEditor(
name='rainbow', size=32, alpha=0.5,
continuous_update=False, on_change=display_palette_info)
```
### Change palette
```python
tf.set_palette('seismic')
```
### Set value range
```python
tf.set_range((0,255))
```
## Screenshot
