Change in Plot Style in SweepMe!

Change in Plot Style in SweepMe! (Version 1.5.7.8)

We would like to inform you about an update to the default plot style in SweepMe!, introduced in version 1.5.7.8. This change aims to improve the readability of plots, especially for signals with large constant values and very small noise.


Background

SweepMe! uses matplotlib for plotting. By default, matplotlib applies scientific notation with an additive offset when displaying large constant signals with small variations.


This could look like the plot shown in the figure above. Here we have a quite constant signal of 250.6 with a noise range of 0.005 and the default representation shows an offset and magnitude. While mathematically correct, this can be unintuitive and may suggest a misleading level of variation.


What Changed

To make plots easier to interpret, we adjusted the default matplotlib style in SweepMe!:

  • Removed additive offset from axis labels.
  • Magnitude notation is now only applied for values above 10⁴ or below 10⁻⁴.
  • Zoom factor has been slightly limited to avoid exaggerated scaling (when using autoscaling, manual axes ranges can still be chosen without restrictions).

The result is a clearer representation of the data, the figure below.


Customization

If you prefer the previous or a completely different style, you can override the default settings:

  • Place a custom default.mplstyle file in:
    Public SweepMe! folder → Resources → styles
    (You can open the Public SweepMe! folder in SweepMe!: File → Open Folder → Public)

  • The new default style modifies these settings:

    Setting Old Value New Value
    axes.formatter.limits -3, 3 -4, 4
    axes.formatter.use_mathtext False True
    axes.formatter.useoffset True False
  • The standard default.mplstyle shipped with SweepMe! can be found in:
    SweepMe! installation directory → Widgets → Plot → mplstyles
    (You can open the installation directory in SweepMe!: File → Open Folder → Main)

Note: Placing your own default.mplstyle in the public folder will completely override the shipped style. Future updates to the default style will not affect your custom setup.


We hope this change improves your experience with SweepMe! plots. If you have feedback or suggestions, feel free to share them.

2 Likes