matplotlib / matplotlib/matplotlib

[ENH]: Plot overlay

Aberta
#30,953 24 comentários 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

New feature
Linguagem predominante
Python
Estrelas
23.2k
Forks
8.5k
Merge médio
1d 6h
PRs com merge (30d)
66

Descrição

### Problem

One limiting factor of interactivity in Matplotlib is that we draw almost all visual elements via Artists onto the figure. This has poor performance for fast changing elements like crosshair cursors, because we always have to redraw the complete figure (or try to fiddle with blitting).

### Proposed solution

The fundamental solution idea here is to pull such elements out of the actual figure and instead overlay them on the not-changing figure image.

This is currently in a very early idea stage.

**What can be achieved with this**
Interactivity with fast changing elments such as:
- Zoom box (already implemented as a special case)
- Crosshair cursors (see also #30516).
- Tooltips
- Selectors

**What still won't be possible**
Dynamically changing plot properties like greying out data depending on a selector like https://docs.bokeh.org/en/latest/docs/examples/interaction/linking/linked_brushing.html.

**What would be needed**
- A concept of overlays. This could be:
a) GUI specific, e.g. we define a set of native primitives (lines, rectangles, maybe semantic ones like CrosshairCursor, similar to artists) that are drawn by the canvas on top of the actual figure image. This requires implementing of the primitives in all backends and will provide the fastest rendering.
b) Create the concept of an "overlay figure" that uses our exising rendering mechanisms to create a (mostly transparent) full image that is drawn on top of the existing figure image.

- Some mapping and event logic, so e.g. that the overlay can draw a line across a complete Axes, or get tooltip information for the current coordinate.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece lendo as abordagens de overlay propostas nesta issue e a issue relacionada sobre crosshair-cursor, #30516. Nenhum arquivo, teste ou entry point é especificado, e a issue ainda está em uma fase inicial de ideação. Uma contribuição precisaria de um design de overlay decidido, requisitos definidos de mapping e eventos e um escopo de implementação claramente definido.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
matplotlib, python
Domínio
data-visualization
Tipo de issue
Funcionalidade
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Pouca atividade
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.