Giter Club home page Giter Club logo

forestplot's Introduction

forestplot

Simple forest plots in python with matplotlib

small_forest_plot

forest_plot is a basic but reasonably flexible function that plots a horizontal scatter and makes use of ax.text() with clip_on set to False. Width of columns can be adjusted using the annot_* args. Plots are setup to generate figures systematic reviews; meta-analysis results were not tested but should work fine by sorting beforehand and passing a custom marker for the meta-analysis results

Horizontal bars should fit to figure width by taking the left and right-most annotation locations from the figure, but the right-hand-side may need adjusting - a tuple can be passed to hbar_lim in this case. If you're saving a figure for publication then the save_fig function can be used for tiffs with lzw compression if needed.

See the examples notebook for small variations. Plots were used to create the figures in the paper Machine learning for genetic prediction of psychiatric disorders: a systematic review by Bracher-Smith et al.

Required packages

  • matplotlib
  • numpy
  • pandas

Basic use

To download and install required packages (shouldn't be necessary as it's just standard scipy): This will also install jupyter notebooks for running examples

forestplot's People

Contributors

seafloor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.