GangCaoLab / CoolBox

Jupyter notebook based genomic data visualization toolkit.
https://gangcaolab.github.io/CoolBox/index.html
GNU General Public License v3.0
224 stars 37 forks source link

Staircase plot style for Hist #31

Closed nvictus closed 3 years ago

nvictus commented 3 years ago

Adds two new plotting styles: stairs and stairsfilled. It provides nicer rendering of interval-supported scores. Uses plt.stairs which requires matplotlib 3.4.

from coolbox import XAxis, BigWig

frame = (
    XAxis() + 
    BigWig('tests/test_data/bigwig_chr9_4000000_6000000.bw', threshold=200) + 
    BigWig('tests/test_data/bigwig_chr9_4000000_6000000.bw', threshold=200, style='stairsfilled')
)

frame.plot("chr9:5600000-6000000")

image

codecov-io commented 3 years ago

Codecov Report

Merging #31 (5430f8c) into master (498625b) will decrease coverage by 0.11%. The diff coverage is 14.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
- Coverage   40.96%   40.85%   -0.12%     
==========================================
  Files          81       81              
  Lines        5055     5076      +21     
==========================================
+ Hits         2071     2074       +3     
- Misses       2984     3002      +18     
Impacted Files Coverage Δ
coolbox/core/track/hist/plot.py 46.61% <14.28%> (-7.00%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 498625b...5430f8c. Read the comment docs.