Skip to content

Commit 6a91998

Browse files
committed
Bugfix
example runs now with matplotlib v3.2.2 too
1 parent e36ccd7 commit 6a91998

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from setuptools import setup, Extension
22
from os import path
33

4-
version = (0, 1, 1)
4+
version = (0, 1, 2)
55

66
try:
77
from numpy import get_include as get_numpy_include

python/tests/examples.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def example_1():
1111
try:
1212
import pandas as pd
1313
import matplotlib.pyplot as plt
14+
from matplotlib.gridspec import GridSpec
1415
import seaborn as sns
1516
except ImportError as err:
1617
print("This example requires modules 'pandas', 'matplotlib' and 'seaborn!'")
@@ -38,9 +39,8 @@ def example_1():
3839
residual_method=7, # RFC_RES_REPEATED
3940
wl={"sd": 1e3, "nd": 1e7, "k": 5})
4041

41-
fig = plt.figure(constrained_layout=True, figsize=(14, 10))
42-
fig.tight_layout()
43-
gs = fig.add_gridspec(3, 2)
42+
fig = plt.figure(figsize=(14, 10))
43+
gs = GridSpec(nrows=3, ncols=2, width_ratios=[1, 2])
4444
ax1 = fig.add_subplot(gs[0, 0])
4545
sns.heatmap(res["rfm"], cmap="YlOrRd", ax=ax1)
4646
ax1.invert_yaxis()
@@ -69,4 +69,6 @@ def example_1():
6969
plt.grid(which="both")
7070
plt.xlabel("Sample #")
7171
plt.ylabel("Value")
72+
73+
fig.tight_layout()
7274
plt.show()

0 commit comments

Comments
 (0)