分享一个Python工具plottable,轻松制作高度个性化的表格,底层为Matplotlib。
例如这样的,
或者这样的,
第一张图详细代码:
# 导入相关包
from pathlib import Path
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from matplotlib.colors import LinearSegmentedColormap
from plottable import ColumnDefinition, Table
from plottable.cmap import normed_cmap
from plottable.formatters import decimal_to_percent
from plottable.plots import circled_image
plt.rcParams["f