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

Exoplanet plugin with QtChart #2447

Merged
merged 8 commits into from
May 18, 2022
Merged

Exoplanet plugin with QtChart #2447

merged 8 commits into from
May 18, 2022

Conversation

gzotti
Copy link
Member

@gzotti gzotti commented May 16, 2022

This shall switch the scatter plot in the ExoPlanets plugin from QCustomPlot to QtCharts.

During development, this displays old and new diagrams side-to-side for comparison. Plotting style, colors, axis labels etc. should be identical to the old version.

Description

Fixes: Qt6-inflicted deprecation

Screenshots (if appropriate):

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update

How Has This Been Tested?

Test Configuration:

  • Operating system: Win10
  • Graphics Card: Geforce 960M

Checklist:

  • My code follows the code style of this project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (header file)
  • I have updated the respective chapter in the Stellarium User Guide
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

- added a few StelProperties
- minor simplifications
- preliminary parallel view of old and new plots
@gzotti gzotti added the feature Entirely new feature label May 16, 2022
@gzotti gzotti added this to the 0.22.2 milestone May 16, 2022
@gzotti gzotti self-assigned this May 16, 2022
@github-actions github-actions bot requested a review from alex-w May 16, 2022 20:58
@gzotti gzotti added enhancement Improve existing functionality qt Issues, related to Qt framework and removed feature Entirely new feature labels May 16, 2022
@github-actions
Copy link

Hello @gzotti! Thank you for this enhancement.

@lgtm-com
Copy link

lgtm-com bot commented May 17, 2022

This pull request introduces 1 alert when merging 7e0264a into dea9f56 - view on LGTM.com

new alerts:

  • 1 for FIXME comment

- auto-plotting on all input changes
- axis scaling
@gzotti
Copy link
Member Author

gzotti commented May 17, 2022

@alex-w I have now removed the requirement to explicitly press the "Plot" button, it goes whenever some input changes.

The only real difference now is the behaviour of QChart for plots with log axes. While QCustomPlot does "something" (I have not found the relevant documentation), QChart plots nothing if at least one value is zero or negative (see metallicity). I am unsure what to do: When creating the series, I could of course filter the values to remove all pairs with zeros/negative numbers if the respective plot axis is set to log.

The QCustomPLot is also not free from issues. Switching away from log with negative numbers needs another "Plot" press to show all values.

@lgtm-com
Copy link

lgtm-com bot commented May 17, 2022

This pull request introduces 2 alerts when merging 0189515 into dea9f56 - view on LGTM.com

new alerts:

  • 2 for FIXME comment

@alex-w
Copy link
Member

alex-w commented May 17, 2022

Not all data can be plot with log axes - I didn’t added a mistake-proofing feature (a foolproof concept).

@gzotti
Copy link
Member Author

gzotti commented May 17, 2022

Are you then OK if I remove the old plot and only write in the SUG that "plots with log axes may fail if some values can be 0 or negative"? Else the exclusion scheme may become a bit "messy" ("complex method").

@alex-w
Copy link
Member

alex-w commented May 17, 2022

Of course, go ahead

- filter positive-only values for log plots
- Plugin dependence on QCustomPlot removed
@gzotti gzotti marked this pull request as ready for review May 17, 2022 23:24
@gzotti
Copy link
Member Author

gzotti commented May 17, 2022

Before merge, I want to go over the SUG chapter and maybe add/change something about the plots. Else I think the code is OK.

@alex-w
Copy link
Member

alex-w commented May 18, 2022

Hmm... Stellarium crashes at exit

Copy link
Member

@alex-w alex-w left a comment

Choose a reason for hiding this comment

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

The Stellarium crashes at exit in master also, so, the issue is not in this PR

@gzotti gzotti merged commit bc4eea3 into master May 18, 2022
@gzotti gzotti deleted the Exoplanets-qcharts branch May 18, 2022 09:12
@gzotti
Copy link
Member Author

gzotti commented May 18, 2022

@alex-w In the root CMakeLists.txt we require Qt5PrintSupport, "just for qcustomplot". If no longer required, we could remove it, or is it now used by something else? (XLS?). The PrintSky plugin will need it obviously, in case we create a useful plugin, but this is another branch.

@alex-w
Copy link
Member

alex-w commented May 18, 2022

No need Qt5PrintSupport now, you can remove or commented it

@github-actions
Copy link

Hello @gzotti! Please check the fresh version (development snapshot) of Stellarium:
https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

@gzotti gzotti mentioned this pull request Jun 13, 2022
24 tasks
@github-actions
Copy link

github-actions bot commented Jul 7, 2022

Hello @gzotti! Please check the latest stable version of Stellarium:
https://github.com/Stellarium/stellarium/releases/latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality qt Issues, related to Qt framework
Development

Successfully merging this pull request may close these issues.

2 participants