---
# System prepended metadata

title: Near-term goals

---

List of new features and reorganization planned for the future, near or far.

Near-term goals
===============

Features for 0.9.9
------------------

* ~ScatterPlotItem performance improvements~
* ~ImageItem performance improvements~
* ImageItem automatic downsampling and clipping to allow display of very-large images
* ~Date/Time axis item~
* ~Make all scipy dependencies optional~
* Stop using dynamic import system; static imports for most of the package and a plugin system for flowcharts


ViewBox changes
---------------

* Make mouse behavior more customizable. Something like: 
  `viewBox.setMouseAction(button='left', event='drag', action='pan', modifiers=[])`
* ViewBox should have better automatic handling of item bounds changes
    - could override GraphicsItem.prepareGeometryChange, but this leads to loops
* Auto-range should ignore items being dragged
* Auto-range should optionally result in major ticks placed at min/max

LegendItem
----------

* Easier to add/remove/hide/otherwise-manage items in the legend
* Better automatic sizing


ColorMap
--------

* Generic colormap class supporting any arbitrary mapping, provides LUT functionality for any maps
* HSV stops in gradient maps
* Integrate more fully with GradientEditor


Documentation Updates
---------------------

* Better coverage and examples of multiprocess module
* Primer on building custom GraphicsItems, Widgets (use of keyPressEvent, mouse events, update)
* Better documentation on handling mouse input


PlotData class
--------------

For better management of plot data across multiple graphics items.
(see PlotData.py)


Long-term goals
===============


Unit Tests
----------

Presently, the entire library of examples is invoked as the only testing procedure. A set of unit tests would greatly improve stability and reliability, especially to ensure no regressions in performance or core features. This is also needed to provide better coverage of less-common platforms.

* ~tests for Linux / Windows / OSX~
* ~test with and without scipy.weave~
* test with and without scipy
* ~test with PyQt and PySide~
* ~python 2.6, 2.7, 3~
* ~PyQt 4.8, 4.9~
* test frozen with py2exe and py2app
* 32/64-bit


Document Coordinate Systems
---------------------------

Support the ability to define, display, and export complete figures using physical units (mm, in, px). 

* Need to remove most references to device coordinate system, define a document coordinate system


Library of compiled modules
---------------------------

Numpy does a fantastic job, but there are still a few places in the code that could benefit from acceleration with compiled modules. Currently we use weave for this, but it has a number of issues that make it unsatisfactory (no py3 support, buggy, overly complex, requires compiler). Compiled modules will be written in C with only standard-library dependencies, and will be accessed via ctypes wrappers. Will try to provide pre-compiled modules for most of the common platforms, option to compile automatically anywhere else. A pure-python fallback must always be available.


GraphicsItem stylesheets
------------------------

Better handling of common style options across all graphicsitems.


GPU Accelerated plotting
------------------------

QGraphicsView has taken us a long way, but Qt seems to have stalled out on optimizing for GPU. May need to move to pure OpenGL to achieve better performance (but this would mean reinventing a LOT of stuff provided by GraphicsView). Current plan is to embed vispy once it is ready! 

Particular interest in improved scatter plot performance (requested 2x)

Many possible ways to move forward on this:

* Use QGraphicsView+QGLWidget with custom GL drawing for graphicsitems. This is easiest, but possibly invokes buggy Qt code.
* Make GraphicsItems drawable in opengl viewport. Harder, but may let us keep most of the GraphicsView features while optimizing the important pieces.
* Switch to vispy entirely and phase out QGraphicsView code over a decade or so.

