Matplotlib:如何使用 UliPlot 将刻度标签显示为满量程百分比
你可以使用 UliPlot 在 Matplotlib 中将刻度标签显示为满量程百分比。方法如下:
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)完整示例
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()Check out similar posts by category:
Python, MatPlotLib
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow