Emperor Plot Visualization on papers and posters

I think it would be really cool if once you create your emperor plot and finish changing all of your settings you could create a QR code. Then you could put this on your posters and/or papers so then people can easily see your emperor plot and be able to rotate it on their own.


Hi @Stephanieorch,


Do you mean something like this? You can already do this easily:
Upload your emperor plot visualization artifact, I used dropbox for above. Create a link for that and place that link into Qiime2View. There is an option for that on the front page that says:

You can also provide a link to a file on Dropbox or a file from the web.

Once you open the visualization artifact simply copy that link and use your preferred QR code app to make the code. That code will automatically retrieve your plot from dropbox and feed it to Qiime2View. You can open this on your phone and tablet too which is really cool!

FYI the above resulting plot is something like 110K Unifrac distances from American Gut.


I suspect this is the key piece preventing this from working right now. @yoshiki and I have talked in the past about how this might be accomplished via a "blob" input type on the action or even using some kind of shared "event" file which could be appended to the ZIP file/uploaded separately in q2view. But I'm afraid neither options exist yet, so we don't have a way to do this.

Hopefully this will be possible someday soon, I really like your motivating example of a poster QR code!


As @ebolyen mentioned, there are a few missing pieces before we can do this through the qiime2 infrastructure.

That being said, if you would really like to do this and you are familiar with Python, you can use Emperor’s python API to get settings pre-loaded on a plot or specify the settings as you wish through a programmatic interface. For example to set predefined colors in a plot you can do:

from emperor import Emperor

viz = Emperor(ordination, metadata)
# other methods like opacity_by, etc also exist

The example above will have the same effect as you opening the resulting ordination and selecting the body_site category in the drop down menu.

Alternatively if you prefer to load a series of settings that you generated through the UI, you could use the settings property:

from emperor import Emperor
import json

viz = Emperor(ordination, metadata)

# emperor-settings.json is the file created by the user interface when you click on save settings
viz.settings = json.load('emperor-settings.json') 

# save the plot to a standalone HTML dir

For more information, here’s Emperor’s Python documentation.