Emperor cuts off labels in downloading

Emperor cuts off labels in downloading

Given the "download SVG + labels" button in my biplot (or in the same PCoA without biplotting), the SVG of the labels is strangely cropped/cutoff.

Example, where you can see the proper legend on the right:

And now the actual SVG of the labels as downloaded:

As always, I'm hoping I've just missed something obvious and under my control, because if the downloading from Emperor is itself broken, I think it's far out of my power to fix. Do I need to just use my own image-editing software to do it manually? Couldn't find this very issue on the forum before; running qiime2-2021.2 through conda. Thanks!

I think this might be related to your previous post regarding resolution issues in Emperor - do you have another machine you can check that SVG on to confirm?

1 Like

Good suggestion. But this quirk persisted across two machines (a Mac running MacOS and a Lenovo tower running Ubuntu), and using both Firefox and Chrome to visualize, for both biplots and the underlying PCoAs, but only for the pond labels---other categorical labels from the very same graphs were fine. This is a low priority for fixing for me, but if if bothers you after this, I'll upload my qzv file. Meanwhile I'll kludge it better with GIMP. Thanks for the attempt.aitchison-pcoa-twentytwentydada.qzv (923.9 KB)

Hey there @wburgess, I had a closer look at some of the scaling logic in emperor (which q2-emperor uses to render these 3D plots) and noticed that there appears to be an issue where the width of the legend is insufficient for very short labels. This is because the scaling logic takes into account the number of characters in the legend as a sort of width multiplier - when there are only two characters in the legend, there apparently isn't quite enough pixels to go around. This would explain why it was fine for other categories in your metadata.

I have submitted a changeset to this tool's authors (cc @yoshiki) - I'm not sure if they will incorporate this or not.

Okay, so some options for moving forward, right now:

  • expand your labels to include the full pond names, rather than abbreviations
  • edit the SVG in a tool like Inkscape or Illustrator to widen the base document size
  • put some kind of padding around your labels in your sample metadata to artificially increase their width
  • generate the legend manually




For posterity, if you run into the tangentially related issue where the plot itself is truncated (example below), just zoom your plot out and export again. Changing the level of zoom in the downloaded figure should allow you to prevent plot cropping.


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