Skip to content

Signal curves are hard to read: pale colors, dotted styles reached too early, slow rendering on HiDPI screens #453

Closed

Description

@PierreRaybaut

Symptoms

Signal curves are hard to read, especially during demonstrations:

  • After the first 10 curves, the automatic style cycle switches to dashed, dash-dot and dash-dot-dot lines. At the default 1 px line width, only 50 to 67 % of a dash-dot-dot or dashed curve is actually drawn, and on noisy signals the pattern dissolves into a cloud of dots.
  • The tab10 color palette was designed for ~2 px lines. At 1 px, 4 of its 10 colors (orange, pink, olive, cyan) have a contrast ratio below 3:1 against the white background, and its gray curve (#7f7f7f) is indistinguishable from the major grid lines (#808080, dotted).
  • The style cycle is global and advances each time a plot item is created, including for the ROI editor, "View in a new window" and other dialogs. Dotted styles are therefore reached with only 2 or 3 curves displayed.
  • On HiDPI screens (125 %, 150 %), a line width of 1.0 is drawn 1.5 device pixels wide, which takes Qt's slow path: a noisy 2000-point signal takes ~800 ms to draw instead of ~3 ms.

Thicker lines are not a solution, because Qt's raster engine is very slow for pens wider than one device pixel.

Proposed changes

Across PlotPy, SigimaX and DataLab:

  1. Line styles: the automatic cycle only uses solid and dashed lines (dash-dot and dash-dot-dot are removed).
  2. Palette: a single palette of about 10 colors with a contrast ratio of at least 3:1 against both the light and the dark plot backgrounds; the gray curve color is removed.
  3. Grid: discreet solid grid lines, adapted to the color theme, so that curves stand out.
  4. Style assignment: automatic styles depend on the position of the curve among the displayed curves (as in Matplotlib), are no longer stored in the signal metadata, and are no longer consumed by dialogs. User-defined styles are kept. Styles saved by earlier versions (tab10 cycle) are recognized as automatic. View > Reset curve styles makes the selected signals use automatic styles again.
  5. HiDPI performance: curves with a line width of 1 or less use a cosmetic pen (one device pixel), which keeps the fast rendering path on HiDPI screens (PlotPy).

Related issues: PlotPyStack/PlotPy#80 (cosmetic pen) and DataLab-Platform/SigimaX#28 (palette, grid, style persistence).

Activity

  1. PierreRaybaut commented on Oct 29, 2026

    @PierreRaybaut
    ContributorAuthor

    Fixed by #454 (merged into develop, will be released in DataLab 1.4.0), with PlotPyStack/PlotPy#81 and DataLab-Platform/SigimaX#29. Follow-ups, opened as separate PRs: PlotPyStack/PlotPy#84 (fast thick curves) and PlotPyStack/PlotPy#85 (min/max downsampling).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions