Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set proper plot scales for ancillary plots #3148

Draft
wants to merge 12 commits into
base: release_6.0.1
Choose a base branch
from

Conversation

krzywon
Copy link
Contributor

@krzywon krzywon commented Nov 14, 2024

Description

This sets the default axis scales for plots based on their plot role. All plots are set to log/log in v6.0.0, including residuals, polydispersity, and P(r) plots. This also removes a matplotlib version check that should no longer be relevant.

Review Checklist:

Documentation (check at least one)

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)

Licencing (untick if necessary)

  • The introduced changes comply with SasView license (BSD 3-Clause)

@krzywon krzywon requested a review from butlerpd November 14, 2024 16:50
@krzywon
Copy link
Contributor Author

krzywon commented Nov 19, 2024

I am making more changes to this in order to resolve #3021. I am removing xtransform and ytransform from the PlotterData object and solely using the DataRole. This will then act as a hint for new plots, but existing plots will not be transformed when new data is appended.

@krzywon krzywon marked this pull request as draft November 19, 2024 21:54
Copy link
Member

@butlerpd butlerpd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problems seem to be getting worse not better? I'm wondering if we need to pull back on the changes and wait for the full plot refactor (that would be mean reverting whatever changes were made in 6.0.0 that caused the problems in the first place)? The old plotting infrastructure is clearly in need of that complete overhaul.

So far I tested only 3 things

  • load 1D file and create plot.
    • now try to do a linear fit (the data is not linear but no matter it should draw a line). The data disappears from the plot with a straight line added
    • Try changing scale .. say to Gunier - it still plots as log log but presumably on transformed data? Same with Porod
    • Now try changing to linear/linear -- we get the log log plot back instead
    • one could go on. This part worked mostly in 6.0 except that the ranges were chosen in very strange ways (so still a problem)
  • Load a 2D data set
    • try an slicer. No 1D data is generated. Instead the following error is thrown:
18:08:12 - ERROR: Traceback (most recent call last): File "sas\qtgui\MainWindow\DataExplorer.py", line 1127, in displayData AttributeError: 'DataRole' object has no attribute 'stand_alone'
  • In 6.0.0 it works but plots everything on log log so the annulus slicer (which should be linear on the x axis for phi) gives a very "interesting" plot
  • Load a sesans data set
    • it now plots in log log and shows no data when using the test data sphere_isis.ses
    • in 6.0.0 just plotting the data produces a linear/linear plot as expected

At this point I've not done any fitting or played with any other plotting functions but not sure how useful an exercise that can be at the moment?

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

Successfully merging this pull request may close these issues.

2 participants