Is there a library for curved text in matplotlib?
I have a project where I recreated 100 matplotlib visualizations from one dataset (Project by Ferdio) and I am struggling to curve the text on the polar charts.
Here is an example of a viz with curved text:
A great visualization for the purpose of visualizing the progress for each country. By focusing on the progress rather than the total values, we clearly see how Denmark surpassed Norway. The gauge-like layout adds an interesting alternative visual...
Est. reading time: 1 minute
And how far I got:
https://curbal.com/curbal-learning-portal/2-of-100-gauge-chart-in-matplotlib
Any pointers?
Thanks in advance!
Not me either!
Nicolas Rougier did it using TextPath on a cartesian axes:
# -----------------------------------------------------------------------------
# Title: Scientific Visualisation - Python & Matplotlib
# Author: Nicolas P. Rougier
# License: BSD
# -----------------------------------------------------------------------------
# Illustrate the use of polar projection and rotated text (with transformation)
# -----------------------------------------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.textpath import TextPath
from matplotlib.patches import PathPatch
from matplotlib.patches import Ellipse
fig = plt.figure(figsize=(6, 6))
ax = fig.add_axes([0, 0, 1, 1], aspect=1)
size = 0.1
vals = np.ones(12)
np.random.seed(123)
This file has been truncated. show original
Maybe the capability can be added to TextPath both for cartesian and polar axes?
I would contribute if I was skilled enough