Adding legends to picard plots

Several plots in multiQC do not include any legends. While you can identify the different lines by hovering with the pointer, it can be combersome, and also it doesn’t transfer well to screenshots (or when exporting to png)

Am I missing something? is there a way to customize the plots so that a legend shows up? I’m currently looking at Picard’s insert-size metrics, but this comment can be extended to many other plots.

Thanks!

This is intentional. It’s because the legend doesn’t scale well - as soon as you have more than just a few samples it quickly becomes unreadable. MultiQC is designed to scale to hundreds / thousands of samples so having a legend item per-sample isn’t really feasible.

I see, and understand the dilema, I wonder if there’s a way around this: e.g.,

  1. provide a legend when there are <=10 samples
  2. in the export menu have a toggle to enable a legend

I have a feeling that MultiQC used to do (1) in the very early days. But even that was problematic as sometimes folks have very long sample names, which messed up the plot (eg. The layout tries to compensate and the plot area itself ends up tiny).

Option (b) could work though… :thinking: Feel free to open a GitHub issue about this.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.