-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Top of the plot gets cut off #47
Labels
Comments
Hi, I also had the same problem. Have you gotten the answer on how to solve it |
Hi @sayadennis, thank you for raising this issue. A quick solution is to adjust the ax = fp.forestplot(df, # the dataframe with results data
estimate='or', # col containing estimated effect size
ll='low', hl='high', # columns containing conf. int. lower and higher limits
varlabel='varname', # column containing variable label
ylabel='Confidence interval', # y-label title
xlabel='Odds Ratio', # x-label title
color_alt_rows=True,
figsize=(4,8),
**{
'xline' : 1.,
"xlinestyle": (0, (10, 5)), # long dash for x-reference line
}
)
ax.set_ylim(0, 5.5)
plt.savefig('test_forest_plot.png', bbox_inches='tight') This seems to be a non-issue in |
@LSYS This solves the issue, thanks! I appreciate the prompt response. |
This was referenced Feb 8, 2023
Closed
LSYS
added a commit
that referenced
this issue
Feb 9, 2023
Merged
LSYS
added a commit
that referenced
this issue
Feb 10, 2023
* Fix spacing issue at top of plot (fixes #48, #47) * Create notebook for some simple regression tests (closes #49) * Tidy imports using isort (closes #50) * Allowed thresholds and symbols for p-values to be passedthrough (fixes #51) * Fix different heigh and fontsize for confidence interval and p-value labels (fixes #53) * Update docs for RTD (closes #54) * Freeze matplotlib-inline dependency in setup.py (closes #56)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! Thank you for building this awesome package.
I'm trying to visualize some odds-ratios and their confidence intervals, and I'm running into an issue where the top of the plot seems to get cut off.
I installed forestplot today via conda with
conda install -c conda-forge forestplot
, and am running it onPython 3.9.6
.Data
Plotting code
What I'm seeing is the attached image, where the top of the plot (where variable "a" should be) is getting cut off. I've tried adjusting the plot size but the issue persists. Any insight or advice would be appreciated!
The text was updated successfully, but these errors were encountered: