LSYS / forestplot

A Python package to make publication-ready but customizable coefficient plots.
http://forestplot.rtfd.io
MIT License
110 stars 10 forks source link

Fix extrapad #83

Open EythorE opened 11 months ago

EythorE commented 11 months ago

In forestplot/graph_utils.py, extrapad was calculated as xlim[1] * (1 + extrapad) which becomes extremely large when effects are not close to 0. These lines were refactored into a function _get_pad() which uses the range xlim[1] - xlim[0] as reference to compute the pad, which fixes the issue.

Modified some of the code to work without internet connection. Some of the code was trying to access csv's from https://github.com/LSYS/forestplot/tree/main/examples/data those csv's are available as a part of this repo. It now first checks if csvs are available in .[forestplot]/examples/data or a user provided Path else it access them through the url.

sonarcloud[bot] commented 11 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud