Commit 91861d89 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update matplotlib_tools.table_only to matplotlib 3.3.1

parent 3192315c
......@@ -5,14 +5,12 @@ import matplotlib as mpl
import os
import pandas as pd
from datetime import datetime
from gluon import current
from math import sqrt
from matplotlib.backends.backend_pdf import PdfPages
from matplotlib.ticker import IndexLocator
NOW = datetime.now()
......@@ -198,7 +196,7 @@ def plot_values(ax,
yoff = (yoffset if value > cut else 2)
i, y = ftrans((i, value))
i, y = finv((i, y+yoff))
i, y = finv((i, y + yoff))
i += xoffset
ax.text(i, y, fmt % value, **default)
......@@ -221,10 +219,8 @@ def table_only(ax, mytable, fontsize=10, cellheight=0.10):
mytable.auto_set_font_size(False)
mytable.set_fontsize(fontsize)
table_props = mytable.properties()
table_cells = table_props['child_artists']
for cell in table_cells:
cell.set_height(cellheight)
table_cells = mytable.properties()["children"]
[cell.set_height(cellheight) for cell in table_cells]
def ticks_and_labels(ax, xlabel="", ylabel=""):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment