Skip to content

Conversation

sbendimerad
Copy link

This PR adjusts the plot axis limits in:

  • File: pymultifracs/scalingfunction.py
  • Function: plot
  • Change: Added plt.xlim(...) and plt.ylim(...) to improve figure scaling

Reason: The original axis limits were either auto-scaled or inconsistent across figures, making comparisons harder. These limits improve visual consistency for multifractal spectral.

@MerlinDumeur
Copy link
Collaborator

It's true that the fixed xlim and ylim are not very flexible. The issues are twofold:

  1. If we automatically determine the x-axis range from the data, multifractal spectra will automatically fill the plot, and it will be very hard to tell from a quick plot whether the data is highly or slightly multifractal, as the x-axis will be rescaled to match the width of the spectrum. We could center by default the x-axis on the center of the spectrum though, to avoid plotting a spectrum outside of the x-axis window.

  2. The nature of the multifractal spectrum in 1D signals means that the y-axis values are only meaningful in the [0, 1] range. I think it makes sense to constrain the spectrum in that range by default. We can add an option to change that in the paramters of the plotting function, or we could alternatively also let people call ax.set_ylim() after plotting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants