Layers in my radar chart are not working properly. Numbers are cut in halves in the radar. Using soccer.plots library.
Tried z-order, changed the plot-order, all colors, fonts, alphas. I need the numbers in the radar to be visible fully.
mpl soccer works fine, soccerplots wants to update the package, to get rid of the z-order prob.
import numpy as np
import matplotlib.pyplot as plt
from math import pi
from soccerplots.radar_chart import Radar
# Parameter names
params = ['xAssist', 'Key Passes', 'Crosses Into Box', 'Cross Completion %', 'Deep Completions',
'Progressive Passes', 'Prog. Pass Accuracy', 'Dribbles', 'Progressive Runs',
'PADJ Interceptions', 'Succ. Def. Actions', 'Def Duel Win %']
# Range values
ranges = [(0.0, 0.15), (0.0, 0.67), (0.06, 6.3), (19.51, 50.0), (0.35, 1.61),
(6.45, 11.94), (62.9, 79.4), (0.43, 4.08), (0.6, 2.33),
(4.74, 7.2), (8.59, 12.48), (50.66, 66.67)]
# Parameter values
values = [0.11, 0.53, 0.70, 27.66, 1.05, 6.84, 84.62, 4.56, 2.22, 5.93, 8.88, 64.29]
# Plot radar
fig, ax = radar.plot_radar(ranges=ranges, params=params, values=values,
radar_color=['#B6282F', '#808080'], zorder=1, alphas=[0.3])
## instantiate object
radar = Radar(background_color="#121212", patch_color="#28252C", label_color="#F0FFF0",
range_color="#F0FFF0", fontfamily="Arial", )
plt.show()
From the looks of it, it seems like an issue with font sizes which you should be able to control. a quick search on the mpl soccer website provides this simple example:
you could also be overlaying one part of the graph over another which blocks out the text. Try their examples and let me know how it goes.