# 2D PCoA plot error qiime2

**URL:** https://forum.qiime2.org/t/2d-pcoa-plot-error-qiime2/26920
**Category:** Technical Support
**Created:** [June 28, 2023, 7:43pm UTC](https://forum.qiime2.org/t/2d-pcoa-plot-error-qiime2/26920 "2023-06-28T19:43:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Han\_Do](https://forum.qiime2.org/user_avatar/forum.qiime2.org/han_do/32/16142_2.png) [@Han\_Do](https://forum.qiime2.org/u/Han_Do)
#### Post date: [June 28, 2023, 7:43pm UTC](https://forum.qiime2.org/t/2d-pcoa-plot-error-qiime2/26920/1 "2023-06-28T19:43:01Z")

</div>

Hi everyone,

I wanted to make a 2D PCoA plots similar to the one below. I can't find any other codes than these. So, I used it and it gave me error.

(qiime2-2023.5) hando@Cinderellas-MacBook-Pro AlphaDiversity\_FS % qiime tools export --output-dir exported unweighted\_unifrac\_pcoa\_results.qza  
make\_2d\_plots.py -i exported/ordination.txt -m metadata4.tsv -o 2D-plots  
Usage: qiime tools export [OPTIONS]

Exporting extracts (and optionally transforms) data stored inside an  
Artifact or Visualization. Note that Visualizations cannot be transformed  
with --output-format

Options:  
--input-path ARTIFACT/VISUALIZATION  
Path to file that should be exported [required]  
--output-path PATH Path to file or directory where data should be  
exported to [required]  
--output-format TEXT Format which the data should be exported as. This  
option cannot be used with Visualizations  
--help Show this message and exit.

```
                There was a problem with the command:                     

```

(1/1?) No such option: --output-dir  
zsh: command not found: make\_2d\_plots.py

 ![animals-12-01738-g002](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/c/1/c1855aba4360c8405d501bd9befe4110dbacf49e.jpeg)

---

<div class="post-metadata">

### Author: ![gregcaporaso](https://forum.qiime2.org/user_avatar/forum.qiime2.org/gregcaporaso/32/17769_2.png) [@gregcaporaso](https://forum.qiime2.org/u/gregcaporaso)
#### Post date: [June 28, 2023, 9:35pm UTC](https://forum.qiime2.org/t/2d-pcoa-plot-error-qiime2/26920/3 "2023-06-28T21:35:39Z")

</div>

Hi @Han_Do,  
The `make_2d_plots.py` command you're trying to access is a QIIME 1 command. That won't be installed in your QIIME 2 environment, and isn't supported anymore, so I would recommend not trying to go that route.

If you have any favorite tool for generating 2D scatterplots, you should be able to load the data with that tool and plot it the Axis 1 and Axis 2 data from the file that you exported.

Some options if you don't have a favorite tool for this are Excel or Google Sheets, [Altair](https://altair-viz.github.io/gallery/scatter_tooltips.html), or [phyloseq](https://joey711.github.io/phyloseq/plot_ordination-examples.html).

Note that you can also use Emperor to view 2D plots. You can axis this functionality in the "Axes" tab of your Emperor plot:

 ![Screenshot 2023-06-28 at 2.34.49 PM](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/e/1/e16a5f4c1285b650a5e3ab2495a50d6e7e8f2866.png)

EDIT: I realize now that none of those tools produce the circles around the points, which may be what you're most interested in from those plots. phyloseq will get you the closest of all of those (thanks for the suggestion @colinbrislawn!). You can also use QIIME 2's [`beta-rarefaction`](https://docs.qiime2.org/2023.5/plugins/available/diversity/beta-rarefaction/) command to generate a jack-knifed Emperor plot that illustrates the variance around each point through multiple (default 10) jack-knife iterations. This isn't the same as the ellipse around the points, like in the plot you shared, but similar idea.

Hope this helps!  
Greg

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [July 30, 2023, 3:35am UTC](https://forum.qiime2.org/t/2d-pcoa-plot-error-qiime2/26920/4 "2023-07-30T03:35:56Z")

</div>

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