I am trying to run an adapted version of the SquareIceSheet example in ISSM
import os
import sys
import numpy as np
import matplotlib.pyplot as plt
from model import model
from plotmodel import plotmodel
from triangle import triangle
from parameterize import parameterize
from setmask import setmask
from solve import solve
from setflowequation import setflowequation
md = model()
md = triangle(md, 'DomainOutline.exp', 50000)
md=setmask(md,'all','')
md=parameterize(md,'Square.py')
md=setflowequation(md,'SSA','all')
md=solve(md,'Stressbalance')
plotmodel(md,'data',md.results.StressbalanceSolution.Vel)
plt.show()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ana/ISSM/bin/plotmodel.py", line 136, in plotmodel
plot_manager(options.list[i].getfieldvalue('model', md), options.list[i], fig, axgrid, i)
File "/home/ana/ISSM/bin/plot_manager.py", line 96, in plot_manager
applyoptions(md, data2, options, fig, axgrid, gridindex)
File "/home/ana/ISSM/bin/applyoptions.py", line 245, in applyoptions
cb.draw_all()
^^^^^^^^^^^
AttributeError: 'Colorbar' object has no attribute 'draw_all'. Did you mean: '_draw_all'?
Looks like there is a compatibility issue with newer versions of Matplotlib where draw_all()
has been replaced with _draw_all()
. ISSM plotting code hasn't been updated to match the latest matplotlib API changes. To temporarily solve this issue I downgraded to matplotlib 3.5.3 ([https://tinyurl.com/5xh5bcbr)])
pip install matplotlib==3.5.3
After this, the code worked well. I thought that I should let you know. Please let me know if you need any additional information or if I can help test a fix. Cheers.
A