Matplotlib: How to show tick labels as percentage of full-scale using UliPlot

You can use UliPlot to show tick labels as percentage of full-scale in Matplotlib. Here’s how:


from UliPlot.TickFormat import *

set_yaxis_tick_format_percent(fullscale=3.3)
# and/or
set_xaxis_tick_format_percent(fullscale=3.3)

Full example

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()

UliPlot TickFormat Percent.svg