# Mcmc\_parcoord()

**URL:** <https://discourse.mc-stan.org/t/mcmc-parcoord/17962>\
**Category:** RStan\
**Tags:** bayesplot\
**Created:** [September 10, 2020, 3:26pm UTC](https://discourse.mc-stan.org/t/mcmc-parcoord/17962 "2020-09-10T15:26:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shira](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/shira/32/14161_2.png) [@shira](https://discourse.mc-stan.org/u/shira)\
**Post date:** [September 10, 2020, 3:26pm UTC](https://discourse.mc-stan.org/t/mcmc-parcoord/17962/1 "2020-09-10T15:26:43Z")

</div>

Hi folks !

I’m a big fan of `mcmc_parcoord()` for looking at divergences, as recommended [here](https://discourse.mc-stan.org/t/concentration-of-divergences/1590).

My superficial question is how to avoid the parameter labels getting cut off like below from [the documentation](https://mc-stan.org/bayesplot/reference/MCMC-parcoord.html) ?

Thank you !

 ![Screen Shot 2020-09-10 at 11.23.59 AM](https://canada1.discourse-cdn.com/flex030/uploads/mc_stan/original/2X/0/013a6d5a8399560f809462eed236f46afcffc4e1.png)

---

<div class="post-metadata">

**Author:** ![jonah](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jonah/32/200_2.png) [@jonah](https://discourse.mc-stan.org/u/jonah)\
**Post date:** [September 10, 2020, 5:00pm UTC](https://discourse.mc-stan.org/t/mcmc-parcoord/17962/2 "2020-09-10T17:00:08Z")

</div>

Hey Shira,

We should fix this in bayesplot but in the meantime you can use `ggplot2::expand_limits()`. For example:

```
x <- example_mcmc_draws(params = 5)

# expand x-axis limit to just greater than number of parameters
mcmc_parcoord(x) + ggplot2::expand_limits(x = 5.5) 

```

Another option that I’ve been using more recently is to flip the plot using `mcmc_parcoord(x) + ggplot2::coord_flip()`, which also usually makes it easier to visualize a greater number of parameters.

---

<div class="post-metadata">

**Author:** ![jonah](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jonah/32/200_2.png) [@jonah](https://discourse.mc-stan.org/u/jonah)\
**Post date:** [September 10, 2020, 5:19pm UTC](https://discourse.mc-stan.org/t/mcmc-parcoord/17962/3 "2020-09-10T17:19:55Z")

</div>

I just opened a PR on GitHub to fix this, so if you want you can try installing that branch of bayesplot instead of using the code in my previous response:

```
devtools::install_github("stan-dev/bayesplot", ref = "mcmc_parcoord-expand_limits")

```

> <https://github.com/stan-dev/bayesplot/pull/239>

---

<div class="post-metadata">

**Author:** ![shira](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/shira/32/14161_2.png) [@shira](https://discourse.mc-stan.org/u/shira)\
**Post date:** [September 10, 2020, 6:47pm UTC](https://discourse.mc-stan.org/t/mcmc-parcoord/17962/4 "2020-09-10T18:47:46Z")

</div>

hooray ! thank you so much, this is perfect.
