Skip to content

Commit d4b5582

Browse files
committed
Customizable figure size
Currently, there is no easy way to change figure sizes when using high-level visualization functions such as `plot_problem`. Generally, I'd prefer controlling plotting through matplotlib's `rcParams`, but this change provides at least some backwards-compatible means of changing figure sizes at a higher level by, e.g. `petab.visualize.plotting.DEFAULT_FIGSIZE = (8, 4)`.
1 parent 1aafa36 commit d4b5582

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

petab/visualize/plotting.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
IdsList = List[str]
2121
NumList = List[int]
2222

23+
# The default figure size
24+
DEFAULT_FIGSIZE = (20, 15)
2325

2426
# also for type hints
2527
# TODO: split into dataplot and subplot level dicts?
@@ -262,7 +264,7 @@ class Figure:
262264
Contains information regarding how data should be visualized.
263265
"""
264266
def __init__(self, subplots: Optional[List[Subplot]] = None,
265-
size: Tuple = (20, 15),
267+
size: Tuple = DEFAULT_FIGSIZE,
266268
title: Optional[Tuple] = None):
267269
"""
268270
Constructor.

0 commit comments

Comments
 (0)