question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Forest plot order by coords and not variables.

See original GitHub issue

Short Description

Hello everyone! In my model I have to variables that I want to compare each of them has several coords. I would like to plot them with a forest plot. With this code:

pm.forestplot(my_model, varnames=['mu_o_c','mu_fo_c'], rope=(0,0), combined=True)

I get this: image But actually I would like them to be ordered as mu_o_c 0, mu_fo_c 0, mu_o_c 1, mu_fo_c 1 … and with different colors since mu_fo_c and mu_o_c are the two states I am trying to compare.

I have used pymc3 to generate the data. Let me know if there is anything I can tell you extra. Thank you very much for your time! Best, Sergio

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sperezconesacommented, Sep 18, 2020

It seems like tight_layout+figsize+textsize seems to do the trick! Muchas gracias! 🙏

0reactions
OriolAbrilcommented, Sep 17, 2020

Not sure, maybe plt.tight_layout?

Read more comments on GitHub >

github_iconTop Results From Across the Web

forestplot: Advanced Forest Plot Using 'grid' Graphics
Description A forest plot that allows for multiple confidence intervals per row, custom fonts for each text element, custom confidence ...
Read more >
plot_forest() should maintain the order of azdata #613
When using plot_forest the ordering of variable is not the same as the one in azdata. In my opinion order should be maintained...
Read more >
How to adjust the ordering of labels in the default legend ...
I am plotting a forest plot in ggplot2 and ...
Read more >
How to forestplot in arviz with only a subset of trace ...
I've been wanting to use the arviz.plot_forest() function to visualize a trace. However, the trace contains a number of variables, ...
Read more >
arviz.plots.forestplot — ArviZ dev documentation
Source code for arviz.plots.forestplot. """Forest plot.""" from ..data import ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found