wilkelab / Opfi

A Python package for discovery, annotation, and analysis of gene clusters in genomics or metagenomics data sets.
https://opfi.readthedocs.io/
MIT License
21 stars 5 forks source link

Set figure size dynamically for stacked operon figures #125

Closed jimrybarski closed 4 years ago

jimrybarski commented 4 years ago

For figures with a single operon, the figure size is determined automatically by matplotlib, but when making a stacked operon figure, we have to generate the figure separately from the operon Axes, so the figure size is completely decoupled from the objects it contains. Currently I've hardcoded it to be 15x10 and this works for most, but not all figures. We need to come up with some way to determine the appropriate width based on the size of the visible operon. The height can be hardcoded since it will always be the same, since there are always exactly two operons.