Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disadvantageous grouping logic in svg exports of visualization plots #3

Open
pierre-kreins opened this issue Nov 11, 2023 · 1 comment

Comments

@pierre-kreins
Copy link

Grouping logic in svg exports of visualization plots (and possibly other plots) is disadvantageous in a number of ways:

  • Every single data point resides inside a a group (containing this single object). The styling is applied to the group and not to the object
  • Same for the marker proteins, the graph lines, the text, etc.
  • Countless (many thousands!) empty groups are present in the svg
  • All these one-object-groups reside in one super group

This results in severe performance issues when trying to use Inkscape to modify t-sne plots where several thousand proteins are displayed. Regrouping operations can be impossible even with Inkscape graphic options reduced to a bare minimum (M1 MacBook Pro).
I suggest the following modifications:

  • Style is applied to objects directly
  • Objects of a same type (e.g, circles, plot lines, text) are grouped into one group. This relates well to the logical overlaying (text is in front of circles that are in front of plot lines)
  • Empty groups should be removed from the svg
@ypnos
Copy link
Contributor

ypnos commented Nov 20, 2023

We are relying on Qt SVG to export the plots. The excessive use of groups is a known behavior of Qt SVG support.

The code could be migrated to Qt 6.5+ where new work started on the SVG generator. Previously, SVG Tiny 1.2 was produced, now also SVG 1.1 can be produced.

I don't know if there will be significant changes to the output.

It is also possible to perform post-processing on the SVG's XML to re-arrange, merge, remove groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants