Skip to content

Sub-plots within the TimeSeries view #9789

@abey79

Description

@abey79

Background

Axis-aligned stacks of plot is a widely requested feature for which there exists no convenient workaround. #7931 proposes a somewhat generic mechanism to "synchronise" axes between multiple views, in hope to benefit from the layout flexibility of our view system. The present issue is a counter-proposal based on the (admittedly somewhat subjective) observation that the view system is too rigid and abstract for this purpose, and that a pragmatic, "sub-plots-within-a-view" approach would provide the same/similar results with lower complexity, both in UX design and code.

Proposal

The core proposal is to allow multiple plots in a grid within the same timeseries view, à la matplotlib's subplots (currently, a view can only contain a single plot). Also, within these sub-plots, any "facing"" axes would automatically be linked and aligned, without a possibility to opt-out (rationale: limit the number of configuration option + use the view system if you want loosely coupled plots).

Challenges

  • Design of the UI to configure the plot view (see proposal below)
  • Design of the blueprint APIs (in particular, how the "entity path filter" mini-language fits in the picture
  • Implementation:
    • egui_plot needs quite a bit of cleanup work
    • can the multi-plot layout—and alignement!—be done outside of egui_plots?

UX proposal

The core proposal consists of a "mini-map" of the plot layout where entities can be dragged and dropped to the desired sub-plot.

By default, there is a single subplot, and all entities produced by the entity path filter are assigned to it:

An entity would be removed by filtering it out from the entity path filter.

The user would click on the + icons to create further rows/column of subplots, and then drag-and-drop entity to dispatch them to the desired sub-plot:

Alternative to the + buttons: a couple of fields to enter the desired number of rows and columns.

Stretch goal 1: assign "weight" to columns or row

(This is probably too janky of a UI and better done by dragging some kind of boundary between sub-plots.)

See designs in Figma for this as well

Stretch goal 2: optionally assign an entity one or more of the X axes

An area would be displayed at the bottom of each column, in which case that entity would be used as abscissa instead of time values. This of course would require some time alignement for all scalars involved, but this is typically the case anyways. For such plot, the time cursor would be displayed as a marker highlighting the corresponding points, as opposed to a vertical line.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    uiconcerns graphical user interface📺 re_vieweraffects re_viewer itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions