Closed xbbao-metis closed 2 months ago
make sure to add
from matplotlib.ticker import FuncFormatter
I could not reproduce this, but it might depend on matplotlib's version. Independent of that, your solution is much cleaner. I patched it and released it as version 1.26.3
Thank you!
Description: Whenever I set plot_trajectory_length_unit to km, cm, and or mm, I'm seeing an issue on in plot.py where the plot length unit is not correctly creating a 'matplotlib.ticker.Formatter' and is instead giving me a type 'function'.
Command:
Console output:
Additional files: Please attach all the files needed to reproduce the error.
Please give also the following information:
evo pkg --version
: v1.26.2evo pkg --pyversion
: 3.8.10evo_config show --brief --no_color
:{ "console_logging_format": "%(message)s", "euler_angle_sequence": "sxyz", "global_logfile_enabled": false, "plot_axis_marker_scale": 0.005, "plot_backend": "Qt5Agg", "plot_figsize": [ 6, 6 ], "plot_fontfamily": "sans-serif", "plot_fontscale": 1.0, "plot_invert_xaxis": false, "plot_invert_yaxis": false, "plot_linewidth": 1.5, "plot_mode_default": "xy", "plot_multi_cmap": "none", "plot_pose_correspondences": true, "plot_pose_correspondences_linestyle": "dotted", "plot_reference_alpha": 0.5, "plot_reference_axis_marker_scale": 0.0, "plot_reference_color": "black", "plot_reference_linestyle": "--", "plot_seaborn_enabled": true, "plot_seaborn_palette": "deep6", "plot_seaborn_style": "darkgrid", "plot_show_axis": true, "plot_show_legend": true, "plot_split": false, "plot_start_end_markers": false, "plot_statistics": [ "rmse", "median", "mean", "std", "min", "max" ], "plot_texsystem": "pdflatex", "plot_trajectory_alpha": 0.75, "plot_trajectory_cmap": "jet", "plot_trajectory_length_unit": "mm", "plot_trajectory_linestyle": "-", "plot_usetex": false, "plot_xyz_realistic": true, "pygments_style": "monokai", "ros_map_alpha_value": 1.0, "ros_map_cmap": "Greys_r", "ros_map_enable_masking": true, "ros_map_unknown_cell_value": 205, "ros_map_viewport": "keep_unchanged", "save_traj_in_zip": false, "table_export_data": "stats", "table_export_format": "csv", "table_export_transpose": true, "tf_cache_lookup_frequency": 10, "tf_cache_max_time": 10000.0 }
def _get_length_formatter(lengthunit: Unit) -> typing.Callable: def formatter(x, ): return "{0:g}".format(x / METER_SCALE_FACTORS[length_unit])
def _get_length_formatter(lengthunit: Unit) -> typing.Callable: def formatter(x, ): return "{0:g}".format(x / METER_SCALE_FACTORS[length_unit])