Skip to main content

Plugin providing support for 1d plotting in napari.

Project description

napari-plot

License PyPI Python Version tests codecov

Plugin providing support for 1d plotting in napari.

This plugin is in very early stages of development and many things are still in a state of disarray. New features and bug fixes will be coming over the coming months.

Note

napari-plot provides several custom icons and stylesheets to take advantage of the Qt backend. Since it would be a bit busy to add multiple layer lists, I opted to include a toolbar that quickly pulls the layer list whenever requested. Simple use the toolbar to access several commonly accessed elements.

Usage

You can use napari-plot alongside napari where it is embedded as a dock widget. If using this option, controls are relegated to toolbar where you can adjust layer properties like you would do in napari.

embedded

Or as a standalone app where only one-dimensional plotting is enabled. In this mode, controls take central stage and reflect napari's own behaviour where layer controls are embedded in the main application.

standalone

Roadmap:

This is only provisional list of features that I would like to see implemented. It barely scratches the surface of what plotting tool should cover so as soon as the basics are covered, focus will be put towards adding more exotic features. If there are features that you certainly wish to be included, please modify the list below or create a new issue

  • Support for new layer types. Layers are based on napari's Layer, albeit in a two-dimensional setting. Supported and planned layers:
    • Line Layer - simple line plot.
    • Scatter Layer - scatter plot (similar to napari's Points layer).
    • Centroids/Segments Layer - horizontal or vertical line segments.
    • InfLine Layer - infinite horizontal or vertical lines that span over very broad range. Useful for defining regions of interest.
    • Region Layer - infinite horizontal or vertical rectangular boxes that span over very broad range. Useful for defining regions of interest.
    • Shapes Layer - napari's own Shapes layer
    • Points Layer - napari's own Points layer
    • Multi-line Layer - more efficient implementation of Line layer when multiple lines are necessary. (TODO)
    • Bar - horizontal and vertical barchart (TODO)
  • Proper interactivity of each layer type (e.g. moving Region or InfLine, adding points, etc...)
  • Intuitive interactivity. napari-plot will provide excellent level of interactivity with the plotted data. We plan to support several types of Tools that permit efficient interrogation of the data. We currently support three zoom modes and plan to add a couple other tools.
    • Box-zoom - standard zooming rectangle. Simply left-mouse + drag/release in the canvas on region of interest
    • Horizontal span - zoom-in only in the y-axis by Ctrl + left-mouse + drag/release in the canvas.
    • Vertical span - span-in only in the x-axis by Shift + left-mouse + drag/release in the canvas.
    • Rectangle select - rectangle tool allowing sub-selection of data in the canvas. Similar to the Box-zoom but without the zooming part. (TODO)
    • Polygon select - polygon tool allowing sub-selection of data in the canvas. (TODO)
    • Lasso select - lasso tool allowing sub-selection of data in the canvas. (TODO)
  • Interactive plot legend
  • Customizable axis visuals.
    • Plot axis enabling customization of tick/label size and color
    • Support for non-linear scale

This napari plugin was generated with Cookiecutter using with @napari's cookiecutter-napari-plugin template.

Installation

You can install napari-plot directly from PyPI via:

pip install napari-plot

or from the git repo:

git clone https://github.com/lukasz-migas/napari-1d.git
cd napari-1d
pip install -e '.[all]'

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the BSD-3 license, "napari-plot" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napari_plot-0.1.3.tar.gz (118.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

napari_plot-0.1.3-py3-none-any.whl (155.3 kB view details)

Uploaded Python 3

File details

Details for the file napari_plot-0.1.3.tar.gz.

File metadata

  • Download URL: napari_plot-0.1.3.tar.gz
  • Upload date:
  • Size: 118.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for napari_plot-0.1.3.tar.gz
Algorithm Hash digest
SHA256 41f935fb5cc4ff9e7ab3c9b5d207cba37b5384eaff0b7c6f4d6388795949f88b
MD5 b273f8436f052d05c62ef29842d9fcdb
BLAKE2b-256 e41d89cfbaf47373fce475e6ab96db51b9611970ec39dd11ffb1609621daba93

See more details on using hashes here.

File details

Details for the file napari_plot-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: napari_plot-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 155.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for napari_plot-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 29c943c56fd876066793d917072d9c981ac25ee1309b737be52aebf70c103bfe
MD5 56b84163069f183ead47755810c65c8e
BLAKE2b-256 2c748666dbd239c59313199648e02d37f33e62f61292937b0b364fef9823ec44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page