TickLabels not shown for Bland Altman Plot in Python

Viewed 104

TickLabels are not shown (neither on x, nor on y axis) when running example code with python 3.9.(commandline: "python.exe RunMyExample.py").

Issue can be reproduced on two other machines with python3.9. Same code in a local .ipynb as well as in google colab .ipynb prints the labels correctly. Printing the labels results in: [Text(1.515, 0, ''), Text(2.5, 0, ''), Text(5.0, 0, ''), Text(7.5, 0, ''), Text(10.0, 0, ''), Text(12.5, 0, ''), Text(15.0, 0, ''), Text(17.5, 0, ''), Text(19.77, 0, '')]

So the information is there. Does anyone have a similar problem or know a workaround?

import matplotlib.pyplot as plt
import pyCompare

method1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
method2 = [2.03, 3.05, 4.79, 5.67, 6.00, 7.82, 8.16, 9.69, 8.53, 10.38, 11.11, 12.17, 13.47, 13.83, 15.15, 16.12, 16.94, 18.09, 19.13, 19.54]


f, ax = plt.subplots(1, figsize = (8,5))
pyCompare.blandAltman(method1, method2, ax=ax, title ="Bland Altman Plot")
print(ax.get_xticklabels())
plt.show()
1 Answers

Installing an older version of pyCompare worked out for me:

pip uninstall pyCompare
pip install pyCompare==1.3.2
Related