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.

Variable names in element labels for `plot_forest` should be optional

See original GitHub issue

Currently, creating a forest plot with plot_forest uses <var name> <coordinate name> as the scheme for labels on the y-axis. This creates a slew of repeated variable names in the labels, which I would guess is almost always undesirable (particularly when you have nice element labels as coordinates in the dataset):

Screen Shot 2021-01-27 at 1 02 58 PM

There should be excluded by default, and turned on with a include_var_names=True (or similar) argument.

Alternatively, the first coordinate could include the variable name, and then exclude it for subsequent ones.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
fonnesbeckcommented, Jan 28, 2021

… and in Bokeh

Screen Shot 2021-01-27 at 10 37 21 PM
2reactions
fonnesbeckcommented, Jan 28, 2021

How about something like this (using the mpl_plot_forest_ridge example):

Screen Shot 2021-01-27 at 10 23 03 PM

here is the current behavior:

Figure_1

Got a PR ready to go if this works for everyone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

forestplot: Advanced Forest Plot Using 'grid' Graphics
The height hoft the vertices. Defaults to npc units corresponding to 10% of the row height.
Read more >
Using variable labels instead of variable names when available
Many packages (like gtsummary ) producing graphs or tables are now adopting the following rule: if defined, use variable labels instead of variable...
Read more >
Forest Plots (Default Method) — forest.default • metafor
Function to create forest plots for a given set of data. ... optional argument to specify a function to transform the x-axis labels...
Read more >
Forest plot to display the result of a meta-analysis - Rdrr.io
A logical indicating whether the name of the grouping variable should be printed in front of the group labels. sep.subgroup. A character string ......
Read more >
Plot regression models — plot_model • sjPlot - Strenge Jacke!
plot_model () creates plots from regression models, either estimates (as ... Use axis.labels = "" or auto.label = FALSE to use the variable...
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