У меня есть значения матрицы, идущей от +1 до -1, и я хотел бы одного цвета для +1 и -1. Есть ли способ сделать это?
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
# Load the example flights dataset and convert to long-form
flights_long = sns.load_dataset("flights")
flights = flights_long.pivot("month", "year", "passengers")
# Draw a heatmap with the numeric values in each cell
f, ax = plt.subplots(figsize=(9, 6))
mv1 = np.mean(flights.mean());
sns.heatmap(flights- mv1, annot=True)
Спасибо.