pyomeca / bioptim

An optimization framework that links CasADi, Ipopt, ACADOS and biorbd for Optimal Control Problem
MIT License
92 stars 46 forks source link

ytick format on graphs #889

Closed Ipuch closed 2 months ago

Ipuch commented 2 months ago

Here is a suggestion instead of replacing tick values @pariterre

Define a formatter function

def format_func(value, tick_number): return f'{value:.2f}'

Apply the formatter to the x and y axis

ax.xaxis.set_major_formatter(FuncFormatter(format_func)) ax.yaxis.set_major_formatter(FuncFormatter(format_func))

pariterre commented 2 months ago

Fixed in #890