diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 80ed9dc7..d97009dd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -23,6 +23,12 @@ Changed or ``b+02`` is used to indicate the exponent then the value and uncertainty are always wrapped in parentheses. +Fixed +^^^^^ + +* Correct ``fit_plot_with_sciform.py`` example script to use new + ``exp_format=ExpFormat.PREFIX`` instead of old ``prefix_exp=True``. + Improved ^^^^^^^^ diff --git a/examples/fit_plot_with_sciform.py b/examples/fit_plot_with_sciform.py index 0b04756d..493d480c 100644 --- a/examples/fit_plot_with_sciform.py +++ b/examples/fit_plot_with_sciform.py @@ -7,7 +7,8 @@ from scipy.optimize import curve_fit from tabulate import tabulate -from sciform import Formatter, ExpMode, RoundMode, SignMode, FormatOptions +from sciform import (Formatter, ExpMode, RoundMode, SignMode, FormatOptions, + ExpFormat) def get_scale_and_offset_from_offset_str( @@ -54,11 +55,11 @@ def prefix_exp_ticks(ax: plt.Axes, axis: Literal['x', 'y'], exp_mode = ExpMode.ENGINEERING_SHIFTED tick_formatter = Formatter(FormatOptions( exp_mode=exp_mode, - prefix_exp=True)) + exp_format=ExpFormat.PREFIX)) offset_formatter = Formatter(FormatOptions( sign_mode=SignMode.ALWAYS, exp_mode=exp_mode, - prefix_exp=True)) + exp_format=ExpFormat.PREFIX)) ax.ticklabel_format(axis=axis, style='sci')