Du kannst UliPlot verwenden, um Tick-Labels als Prozent des Vollskalenwerts in Matplotlib anzuzeigen. So geht’s:
uliplot_percent_example.py
from UliPlot.TickFormat import *
set_yaxis_tick_format_percent(fullscale=3.3)
# and/or
set_xaxis_tick_format_percent(fullscale=3.3)Vollständiges Beispiel
uliplot_percent_full_example.py
import matplotlib.pyplot as plt
import numpy as np
from UliPlot.TickFormat import *
x = np.linspace(0, 10, 100)
y = np.sin(x)
plt.plot(x, y)
set_yaxis_tick_format_percent(fullscale=3.3)
plt.show()
Ähnliche Beiträge nach Kategorie:
Python Matplotlib
Wenn dieser Beitrag dir geholfen hat, erwäge, mir einen Kaffee zu spendieren oder per PayPal zu spenden, um die Recherche und Veröffentlichung neuer Beiträge auf TechOverflow zu unterstützen